{"id":19143689,"url":"https://github.com/ogulcan/filter-wp-api","last_synced_at":"2025-05-07T01:12:13.936Z","repository":{"id":215165494,"uuid":"103916352","full_name":"ogulcan/filter-wp-api","owner":"ogulcan","description":"A plugin that clears some WordPress Rest API fields","archived":false,"fork":false,"pushed_at":"2017-10-21T13:16:25.000Z","size":88,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T04:51:20.115Z","etag":null,"topics":["wordpress-plugin","wp-rest-api"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ogulcan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-18T08:59:43.000Z","updated_at":"2024-08-18T09:34:44.000Z","dependencies_parsed_at":"2024-01-02T23:59:22.933Z","dependency_job_id":null,"html_url":"https://github.com/ogulcan/filter-wp-api","commit_stats":null,"previous_names":["ogulcan/filter-wp-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogulcan%2Ffilter-wp-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogulcan%2Ffilter-wp-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogulcan%2Ffilter-wp-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogulcan%2Ffilter-wp-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogulcan","download_url":"https://codeload.github.com/ogulcan/filter-wp-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793653,"owners_count":21805058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress-plugin","wp-rest-api"],"created_at":"2024-11-09T07:32:31.612Z","updated_at":"2025-05-07T01:12:13.899Z","avatar_url":"https://github.com/ogulcan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003ca href=\"https://wordpress.org/plugins/filter-wp-api/\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ogulcan/filter-wp-api/master/img/icon.png\" alt=\"Filter WP API\" width=\"300\"\u003e\u003c/a\u003e\n  \t\u003cbr\u003e\n  \tFilter Wordpress REST API\n  \t\u003cbr\u003e\n\u003c/h1\u003e\n\n\n\u003ch4 align=\"center\"\u003eA wordpress plugin that clears huge fields of \u003ca href=\"https://developer.wordpress.org/rest-api/\" target=\"_blank\"\u003eWP Rest API\u003c/a\u003e.\u003c/h4\u003e\n\n## Overview\n\nIf you ever used WP Rest API, you should have noticed that there are lots of fields that even your client does not need. It makes no sense to load all fields for simple list or even single post view.\n\nThis plugin aims to remove redundant fields on Rest API. For now, it's only available for posts and users.\n\n## Features\n\nThere are two endpoints: `compact` and `detailed`. \n\nCompact is useful for listing posts/users/ and Detailed is better for single post/user view.\n\nHere is what `compact` endpoint looks like for example posts:\n\n```json\n[\n\t{\n\t\t\"id\": 1178,\n\t\t\"title\": \"Markup: HTML Tags and Formatting\",\n\t\t\"link\": \"http://localhost/wordpress/2013/01/11/markup-html-tags-and-formatting/\",\n\t\t\"date\": \"2013-01-11T20:22:19\",\n\t\t\"image\": null\n\t},\n\t{\n\t\t\"id\": 1177,\n\t\t\"title\": \"Markup: Image Alignment\",\n\t\t\"link\": \"http://localhost/wordpress/2013/01/10/markup-image-alignment/\",\n\t\t\"date\": \"2013-01-11T20:22:19\",\n\t\t\"image\": \"http://localhost/wordpress/wp-content/uploads/2013/03/soworthloving-wallpaper.jpg\"\n\t},\n\t{\n\t\t\"id\": 1176,\n\t\t\"title\": \"Markup: Text Alignment\",\n\t\t\"link\": \"http://localhost/wordpress/2013/01/09/markup-text-alignment/\",\n\t\t\"date\": \"2013-01-11T20:22:19\",\n\t\t\"image\": null\n\t}\n]\n``` \n\n\nHere is `detailed` endpoint:\n\n```json\n[\n\t{\n\t\t\"id\": 1178,\n\t\t\"title\": \"Markup: HTML Tags and Formatting\",\n\t\t\"link\": \"http://localhost/wordpress/2013/01/11/markup-html-tags-and-formatting/\",\n\t\t\"author\": 2,\n\t\t\"image\": null,\n\t\t\"content\": \"\u003ch2\u003eHeadings\u003c/h2\u003e\\n\u003ch1\u003eHeader one\u003c/h1\u003e\\n\u003ch2\u003eHeader two\u003c/h2\u003e\\n\u003ch3\u003eHeader three\u003c/h3\u003e\\n\u003ch4\u003eHeader four\u003c/h4\u003e\\n\u003ch5\u003eHeader five\u003c/h5\u003e\\n\u003ch6\u003eHeader six\u003c/h6\u003e\\n\u003ch2\u003eBlockquotes\u003c/h2\u003e\\n\u003cp\u003eSingle line blockquote:\u003c/p\u003e\\n\u003cblockquote\u003e\u003cp\u003eStay hungry. Stay foolish.\u003c/p\u003e\u003c/blockquote\u003e\\n\u003cp\u003eMulti line blockquote with a cite reference:\u003c/p\u003e\\n\u003cblockquote\u003e\u003cp\u003ePeople think focus means saying yes to the thing you\u0026#8217;ve got to focus on. But that\u0026#8217;s not what it means at all. It means saying no to the hundred other good ideas that there are. You have to pick carefully. I\u0026#8217;m actually as proud of the things we haven\u0026#8217;t done as the things I have done. Innovation is saying no to 1,000 things. \u003c/p\u003e\u003c/blockquote\u003e\\n\u003cp\u003e\u003ccite\u003eSteve Jobs\u003c/cite\u003e \u0026#8211; Apple Worldwide Developers\u0026#8217; Conference, 1997\u003c/p\u003e\\n\u003ch2\u003eTables\u003c/h2\u003e\\n\u003ctable\u003e\\n\u003cthead\u003e\\n\u003ctr\u003e\\n\u003cth\u003eEmployee\u003c/th\u003e\\n\u003cth\u003eSalary\u003c/th\u003e\\n\u003cth\u003e\u003c/th\u003e\\n\u003c/tr\u003e\\n\u003c/thead\u003e\\n\u003ctbody\u003e\\n\u003ctr\u003e\\n\u003cth\u003e\u003ca href=\\\"http://example.org/\\\"\u003eJohn Doe\u003c/a\u003e\u003c/th\u003e\\n\u003ctd\u003e$1\u003c/td\u003e\\n\u003ctd\u003eBecause that\u0026#8217;s all Steve Jobs needed for a salary.\u003c/td\u003e\\n\u003c/tr\u003e\\n\u003ctr\u003e\\n\u003cth\u003e\u003ca href=\\\"http://example.org/\\\"\u003eJane Doe\u003c/a\u003e\u003c/th\u003e\\n\u003ctd\u003e$100K\u003c/td\u003e\\n\u003ctd\u003eFor all the blogging she does.\u003c/td\u003e\\n\u003c/tr\u003e\\n\u003ctr\u003e\\n\u003cth\u003e\u003ca href=\\\"http://example.org/\\\"\u003eFred Bloggs\u003c/a\u003e\u003c/th\u003e\\n\u003ctd\u003e$100M\u003c/td\u003e\\n\u003ctd\u003ePictures are worth a thousand words, right? So Jane x 1,000.\u003c/td\u003e\\n\u003c/tr\u003e\\n\u003ctr\u003e\\n\u003cth\u003e\u003ca href=\\\"http://example.org/\\\"\u003eJane Bloggs\u003c/a\u003e\u003c/th\u003e\\n\u003ctd\u003e$100B\u003c/td\u003e\\n\u003ctd\u003eWith hair like that?!\",\n\t\t\"date\": \"2013-01-11T20:22:19\",\n\t\t\"categories\": [\n\t\t\t29\n\t\t]\n\t},\n\t{\n\t\t\"id\": 1177,\n\t\t\"title\": \"Markup: Image Alignment\",\n\t\t\"link\": \"http://localhost/wordpress/2013/01/10/markup-image-alignment/\",\n\t\t\"author\": 2,\n\t\t\"image\": \"http://localhost/wordpress/wp-content/uploads/2013/03/soworthloving-wallpaper.jpg\",\n\t\t\"content\": \"\u003cp\u003eWelcome to image alignment! The best way to demonstrate the ebb and flow of the various image positioning options is to nestle them snuggly among an ocean of words. Grab a paddle and let\u0026#8217;s get started.\u003c/p\u003e\\n\u003cp\u003eOn the topic of alignment, it should be noted that users can choose from the options of \u003cem\u003eNone\u003c/em\u003e, \u003cem\u003eLeft\u003c/em\u003e, \u003cem\u003eRight, \u003c/em\u003eand \u003cem\u003eCenter\u003c/em\u003e. In addition, they also get the options of \u003cem\u003eThumbnail\u003c/em\u003e, \u003cem\u003eMedium\u003c/em\u003e, \u003cem\u003eLarge\u003c/em\u003e \u0026amp; \u003cem\u003eFullsize\u003c/em\u003e.\u003c/p\u003e\\n\u003cp style=\\\"text-align:center;\\\"\u003e\u003cimg class=\\\"size-full wp-image-906 aligncenter\\\" title=\\\"Image Alignment 580x300\\\" alt=\\\"Image Alignment 580x300\\\" src=\\\"http://localhost:8888/wordpress/wp-content/uploads/2013/03/image-alignment-580x300.jpg\\\" width=\\\"580\\\" height=\\\"300\\\" /\u003e\u003c/p\u003e\\n\u003cp\u003eThe image above happens to be \u003cem\u003e\u003cstrong\u003ecentered\u003c/strong\u003e\u003c/em\u003e.\u003c/p\u003e\\n\u003cp\u003e\u003cstrong\u003e\u003cimg class=\\\"size-full wp-image-904 alignleft\\\" title=\\\"Image Alignment 150x150\\\" alt=\\\"Image Alignment 150x150\\\" src=\\\"http://localhost:8888/wordpress/wp-content/uploads/2013/03/image-alignment-150x150.jpg\\\" width=\\\"150\\\" height=\\\"150\\\" /\u003e\u003c/strong\u003eThe rest of this paragraph is filler for the sake of seeing the text wrap around the 150\u0026#215;150 image, which is \u003cem\u003e\u003cstrong\u003eleft aligned\u003c/strong\u003e\u003c/em\u003e.\",\n\t\t\"date\": \"2013-01-10T20:15:40\",\n\t\t\"categories\": [\n\t\t\t29\n\t\t]\n\t}\n]\n``` \n\nSo here is `compact` endpoint looks like for example users:\n\n```json\n[\n\t{\n\t\t\"id\": 1,\n\t\t\"name\": \"Example User\",\n\t\t\"image\": \"http://0.gravatar.com/avatar/ce98d9ae462f57b6427e3c8abad827?s=96\u0026d=mm\u0026r=g\"\n\t},\n\t{\n\t\t\"id\": 2,\n\t\t\"name\": \"Another Example User\",\n\t\t\"image\": \"http://0.gravatar.com/avatar/6f673b94785fd6f49c62202aff96b5?s=96\u0026d=mm\u0026r=g\"\n\t}\n]\n``` \n\nAnd here is `detailed` endpoint looks like for example users:\n```json\n[\n\t{\n\t\t\"id\": 2,\n\t\t\"name\": \"Murat Karayalçın\",\n\t\t\"desc\": \"\",\n\t\t\"image\": \"http://0.gravatar.com/avatar/ce98d9ae4bc62f57b6427e3c8abad827?s=96\u0026d=mm\u0026r=g\",\n\t\t\"link\": \"http://localhost/politikyol/author/mkarayalcin/\"\n\t},\n\t{\n\t\t\"id\": 1,\n\t\t\"name\": \"Oğulcan Orhan\",\n\t\t\"desc\": \"\",\n\t\t\"image\": \"http://0.gravatar.com/avatar/6f673b9475f85fd6f49c62202aff96b5?s=96\u0026d=mm\u0026r=g\",\n\t\t\"link\": \"http://localhost/politikyol/author/root/\"\n\t}\n]\n``` \n\n## Installition\n\nPlugin is ready on wordpress [plugins][https://wordpress.org/plugins/filter-wp-api/]. You can find via search on plugins. Or just download this project and upload `filter-wp-api/` directory into your `wp-content/plugins`. \n\nAfter installition, just add `?_compact` or `?_detailed` as GET parameter at the end of the URL.\n\n## Notes\n\n* First image of featured media will be added as 'image' on detailed.\n* Modified was used as default date.\n* Wordpress version should be higher than 4.7\n\n### Links\n\n* [WP Rest API](https://developer.wordpress.org/rest-api/)\n* [WordPress Plugin Boilerplate](https://github.com/DevinVinson/WordPress-Plugin-Boilerplate)\n* [Awesome Readme](https://github.com/matiassingers/awesome-readme)\n* [Issues](https://github.com/ogulcan/filter-wp-api/issues)\n* [Changelog](https://github.com/ogulcan/filter-wp-api/blob/master/CHANGELOG.md)\n\n#### License\n\nAll code found in this repository is licensed under GPL v3\n[source]\n----\n    Copyright (C) 2017 Ogulcan Orhan\n\n    Filter WP Api is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    Filter WP Api is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogulcan%2Ffilter-wp-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogulcan%2Ffilter-wp-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogulcan%2Ffilter-wp-api/lists"}