Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Version 2.0 Beta 2: You Finally Made a Monkey Out of Me

Pre-release
Pre-release

Choose a tag to compare

@rachelbaker rachelbaker released this 28 May 15:40
· 1940 commits to develop since this release
  • Load the WP REST API before the main query runs.

    The rest_api_loaded function now hooks into the parse_request action.
    This change prevents the main query from being run on every request and
    allows sites to set WP_USE_THEMES to false. Previously, the main query
    was always being run (SELECT * FROM wp_posts LIMIT 10), even though the
    result was never used and couldn't be cached.

    (props @rmccue, #1270)

  • Register a new field on an existing WordPress object type.

    Introduces register_api_field() to add a field to an object and
    its schema.

    (props @joehoyle, @rachelbaker, #927)
    (props @joehoyle, #1207)
    (props @joehoyle, #1243)

  • Add endpoints for viewing, creating, updating, and deleting Terms for a Post.

    The new WP_REST_Posts_Terms_Controller class controller supports routes for
    Terms that belong to a Post.

    (props @joehoyle, @danielbachhuber, #1216)

  • Add pagination headers for collection queries.

    The X-WP-Total and X-WP-TotalPages are now present in terms, comments,
    and users collection responses.

    (props @danielbachhuber, #1182)
    (props @danielbachhuber, #1191)
    (props @danielbachhuber, @joehoyle, #1197)

  • List registered namespaces in the index for feature detection.

    The index (/wp-json by default) now contains a list of the available
    namespaces. This allows for simple feature detection. You can grab the index
    and check namespaces for wp/v3 or pluginname/v2, which indicate the
    supported endpoints on the site.

    (props @rmccue,, #1283)

  • Standardize link property relations and support embedding for all resources.

    Change link properties to use IANA-registered relations. Also adds embedding
    support to Attachments, Comments and Terms.

    (props @rmccue, @rachelbaker, #1284)

  • Add support for Composer dependency management.

    Allows you to recursively install/update the WP REST API inside of WordPress
    plugins or themes.

    (props @QWp6t, #1157)

  • Return full objects in the delete response.

    Instead of returning a random message when deleting a Post, Comment, Term, or
    User provide the original resource data.

    (props @danielbachhuber, #1253)
    (props @danielbachhuber, #1254)
    (props @danielbachhuber, #1255)
    (props @danielbachhuber, #1256)

  • Return programmatically readable error messages for invalid or missing
    required parameters.

    (props @joehoyle, #1175)

  • Declare supported arguments for Comment and User collection queries.

    (props @danielbachhuber, #1211)
    (props @danielbachhuber, #1217)

  • Automatically validate parameters based on Schema data.

    (props @joehoyle, #1128)

  • Use the show_in_rest attributes for exposing Taxonomies.

    (props @joehoyle, #1279)

  • Handle parent when creating or updating a Term.

    (props @joehoyle, #1221)

  • Limit fields returned in embed context User responses.

    (props @rachelbaker, #1251)

  • Only include parent in term response when tax is hierarchical.

    (props @danielbachhuber, #1189)

  • Fix bug in creating comments if type was not set.

    (props @rachelbaker, #1244)

  • Rename post_name field to post_slug.

    (props @danielbachhuber, #1235)

  • Add check when creating a user to verify the provided role is valid.

    (props @rachelbaker, #1267)

  • Add link properties to the Post Status response.

    (props @joehoyle, #1243)

  • Return 0 for parent in Post response instead of null.

    (props @danielbachhuber, #1269)

  • Only link author when there's a valid author

    (props @danielbachhuber, #1203)

  • Only permit querying by parent term when tax is hierarchical.

    (props @danielbachhuber, #1219)

  • Only permit deleting posts of the proper type

    (props @danielbachhuber, #1257)

  • Set pagination headers even when no found posts.

    (props @danielbachhuber, #1209)

  • Correct prefix in rest_request_parameter_order filter.

    (props @quasel, #1158)

  • Retool WP_REST_Terms_Controller to follow Posts controller pattern.

    (props @danielbachhuber, #1170)

  • Remove unused accept_json argument from the register_routes method.

    (props @quasel, #1160)

  • Fix typo in sanitize_params inline documentation.

    (props @Shelob9, #1226)

  • Remove commented out code in dispatch method.

    (props @rachelbaker, #1162)

View all changes