Description
WP Rest API Customizer provides an easy to use interface to modify WP rest API response. Sometimes you may need to remove few unnecessary JSON objects from the response to improver performance of your application. This plugin can do it for you.
Major features in WP Rest API Customizer include:
- Adds Large, Medium and Small featured image URL’s to JSON response.
- Enables adding comments from third party clients without user authentication.
- Add’s a new route to get post id from post url.
- You can unset any object you don’t need from /wp-json/wp/v2/posts end point.
Screenshots
Installation
The quickest method for installing the WP Rest API Customizer is:
- Visit Plugins -> Add New in the WordPress dashboard.
- Search for
WP REST API Customizer
without quotes in search box. - Click «Install».
- Finally click
Activate Plugin
. - Go to Settings -> WP Rest API Customizer and check the desired fields to modify the defualt WP API response.
If you would prefer to do things manually then follow these instructions:
- Extract the dowloaded plugin file.
- Upload the
wp-rest-api-customizer
folder to the/wp-content/plugins/
directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to Settings -> WP Rest API Customizer and check the desired fields to modify the defualt WP API response.
FAQ
-
Will my app performance increase if I uncheck all fields?
-
No, you should not uncheck everything without understanding their actual usage. Few of them might be used by your theme, other plugins are even your app.
-
I enabled POST ID from POST URL custom route, how to use it?
-
By enabling it, you created a new route. Send a GET request to https://www.geekdashboard.com/wp-json/wp-rest-api-customizer/url-to-id and add your post url in header with key ‘url’
-
Yes, it is completely safe. But make sure you enabled comment moderation in WordPress settings -> Discussion to prevent spam comments.
-
What is the use of adding featured image urls. I’m already getting image id’s?
-
It depends on your requirements. Assume you’re showing 20 recent posts with title and feature image in your Android application. By addig featured image url’s to JSON object, you’re saving 20 requests and ultimately saving user’s data, your site bandwidth and improving app performance. Presto!
-
Can I create my own routes with this plugin?
-
Currently our plugin didn’t support creating own routes. We are planning it in next updates. However if you need a custom router which is useful to others (like gettig post id from post url), ask us via support. We’ll add it and update the plugin.
-
How can I contribute to WP Rest API Customizer?
-
You can get in touch with from our blog or contact us page and we’ll have a discussion.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“WP Rest API Customizer” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “WP Rest API Customizer” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1
Release Date – 4 September 2017
- Readme file updated.
- Plugin icon updated.
1.0
Release Date – 30 August 2017
- Initial release.