Releases: factor1/better-rest-endpoints
Add `orderby` param to custom taxonomy term endpoints
Get Posts Belonging To A Taxonomy Term
better-wp-endpoints/v1/{taxonomy}/{term}
Gets posts from a taxonomy term. Accepts rthe following parameters:
- per_page (int)
- page (int)
- content (boolean - setting to false omits
the_content
from being returned) - orderby (string) - see the codex for options, currently does not support multiple values
Add Response Headers
Added response headers (X-WP-Total, X-WP-TotalPages
) for endpoints that return collections.
Update Validation and Sanitization Callbacks
Fixes validation and sanitization callbacks to check data properly.
Adds Orderby Param to CPT Endpoints
Release 0.1.10 adds the orderby
param for custom post type endpoints.
Fix Custom Taxonomy Object
Fixes a bug where the custom taxonomy endpoint would only return one post instead of an array of all posts.
Add Taxonomy Term Endpoints
Get Posts Belonging To A Taxonomy Term
better-wp-endpoints/v1/{taxonomy}/{term}
Gets posts from a taxonomy term. Accepts rthe following parameters:
- per_page (int)
- page (int)
- content (boolean - setting to false omits
the_content
from being returned)
Returns the following JSON Response:
- ID
- slug
- title
- date (ISO 8601)
- post terms
- excerpt
- content
- all possible thumbnail sizes & URLs
- Author & Author ID
- ACF Fields, if applicable
Add CPT Endpoint by Slug
Adds endpoint to get CPT by slug.
Fix empty Taxonomies on Posts
Wraps foreach
statement in an if statement to check if they are empty to avoid errors.
Fixes Content Rendering
Fixes get_the_content
to be passed through the_content
filter to assure that HTML elements and shortcodes are rendered correctly.
Add slugs to menu response
Adds slugs to menu responses.