Mô tả
If 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.
This plugin aims to remove redundant fields on Rest API. For now, it’s only available for posts.
Features
There are two endpoints: “compact” and “detailed.
- “Compact” is useful for listing posts and Detailed is better for single post view.
- First image of featured media will be added as ‘image’ on detailed and compact.
- Modified was used as default date.
- Requires at least WordPress 4.7
Ảnh màn hình
Cài đặt
This section describes how to install the plugin and get it working.
- Upload the plugin files to the
/wp-content/plugins/filter-wp-api
directory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress
- Use the Settings->Filter Rest Api screen to configure the plugin
- Both endpoints are enabled as default
Hỏi đáp
- How to use compact and detailed endpoints?
-
Just add “?_compact” or “?_detailed” to end of api url.
- Disabling plugin also disables rest api?
-
Nope. Just filtering fields will be disabled. Even you call endpoints, default data will be available.
- Compact and detailed are not working for pages/category/author/media
-
Correct. This is a plugin that only filters for posts. Please stay tuned for more features.
Đánh giá
Không có đánh giá nào cho plugin này.
Người đóng góp & Lập trình viên
“Filter WP Api” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.
Những người đóng gópDịch “Filter WP Api” sang ngôn ngữ của bạn.
Muốn tham gia phát triển?
Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.
Nhật ký thay đổi
1.0
Initial version.