Skip to content

Releases: factor1/better-rest-endpoints

Add Parent Slugs to Pages and Page By ID Endpoints

11 Dec 22:33
Compare
Choose a tag to compare

Adds the parent slug if it exists, returns false if not.

Add category_name param to posts endpoint

30 Nov 00:17
Compare
Choose a tag to compare

Adds the category_name param to the posts endpoint to query posts by category slug (name).

Default Author Param Hotfix

29 Nov 23:45
Compare
Choose a tag to compare
Pre-release

Switches the default author param for the posts endpoint to be an empty string instead of null as null was interpreted as a string.

Add `author` parameter to `posts` endpoint

29 Nov 23:25
Compare
Choose a tag to compare

Adds the author parameter to the /posts endpoint.

  • author (string) limit posts by author nice name (user_nicename)

Add `user_nicename` to post responses

29 Nov 18:09
Compare
Choose a tag to compare
Pre-release

Adds user_nicename to all post responses. Useful for doing queries of posts by author.

Add Exclude Parameter for Posts

28 Nov 16:59
Compare
Choose a tag to compare
Pre-release

Adds the exclude parameter for posts endpoint.

Add Parameters to Post Endpoint

28 Nov 16:34
Compare
Choose a tag to compare
Pre-release

Adds order and orderby parameters for posts.

- orderby (string)
- order (string - 'ASC' vs 'DESC')

Add Search Endpoint

27 Nov 22:46
Compare
Choose a tag to compare
Add Search Endpoint Pre-release
Pre-release

Search

better-wp-endpoints/v1/search
Gets a collection of posts and pages based on the search parameter. Accepts the following parameters:

  • page (int)
  • per_page (int)
  • category id (int)
  • tag id (int)
  • content (boolean) set to false to omit content from showing in JSON response
  • search (string | required)

It returns a JSON response with the following (returns an empty array if no posts found):

  • id
  • slug
  • title
  • date (ISO 8601)
  • excerpt
  • content
  • all possible thumbnail sizes & URL
  • Author & Author ID
  • Categories
  • Category IDs
  • Tags
  • Tag IDs
  • ACF fields, if applicable

Fix CPT By Slug Endpoint

21 Nov 22:25
Compare
Choose a tag to compare
Pre-release

Fixes the get_cpt_by_slug endpoint to actually pull the correct slug using the name argument in WP_Query.

Add parameter callbacks to custom tax cpts

10 Nov 21:19
Compare
Choose a tag to compare
0.1.14

Merge branch 'hotfix/tax-args'