Version 2.0 Beta 12: Canyonero
Pre-release-
BREAKING CHANGE: Removes meta endpoints from primary plugin.
If your project depends on post meta endpoints, please install WP REST API Meta Endpoints. For the gory history of meta, read #1425 and linked issues. At this time, we recommend using
register_rest_field()to expose meta (docs).(props @danielbachhuber, #2172)
-
BREAKING CHANGE: Returns original resource when deleting PTCU.
Now that all resources require the
forceparam, we don't need to wrap delete responses with thetrashstate.(props @danielbachhuber, #2163)
-
BREAKING CHANGE: Uses
rolesrather thanrolein the Users controller.Building the REST API gives us the opportunity to standardize on
roles, instead of having bothrolesandrole. -
BREAKING CHANGES: Moves to consistent use of
contextthroughout controllers.Contexts limit the data present in the response. Here's how to think of them:
embedcorrelates with sidebar representation,viewrepresents the primary public view, andeditis the data expected for an editor.(props @danielbachhuber, #2205, #2204, #2203, #2218, #2216, #2230, #2184, #2235)
-
BREAKING CHANGE: Removes
post_*query param support forGET /wp/v2/comments.The proper pattern is to use
GET /wp/v2/poststo fetch the post IDs to limit the request to.(props @danielbachhuber, #2165)
-
BREAKING CHANGE: Introduces
rest_validate_request_arg()/rest_sanitize_request_arg().Dedicated functions means we can use them for validating / sanitizing query args too. Removes
WP_REST_Controller::validate_schema_property()andWP_REST_Controller::sanitize_schema_property().(props @danielbachhuber, #2166, #2213)
-
Requires minimum value of 1 for
pageparam.(props @danielbachhuber, #2241)
-
Introduces
media_typeandmime_typeparams forGET /wp/v2/media.(props @danielbachhuber, #2231)
-
Uses the term cache for post data.
-
Supports for querying comments where
post=0.(props @danielbachhuber, #1865)
-
Exposes taxonomy and post type capabilities in
context=edit.(props @danielbachhuber, #2216)
-
Errors early when user can't GET types or taxonomies when
context=edit.(props @danielbachhuber, #2218)
-
Passes original $request context to
prepare_items_query.(props @danielbachhuber, #2211)
-
Adds
parentandparent_excludeparams to GET Comments.(props @danielbachhuber, #2206)
-
Enforces minimum 1 and maximum 100 values for
per_pageparameter.(props @danielbachhuber, #2209)
-
Adds
authorandauthor_excludeparams to GET Posts and Comments.(props @danielbachhuber, #2200, #2200)
-
Adds
menu_orderparam forGETPages; supportmenu_orderorderby.(props @danielbachhuber, #2193)
-
Only calls
sanitize_text_field()when sanitizingtype=string,format=email.(props @danielbachhuber, #2185)
-
Validates
GET /wp/v2/commentsprivate query params.Returns an error when user doesn't have permission to use them, instead of silently discarding.
(props @danielbachhuber, #2178)
-
Explicitly prevents uploading attachments to other attachments or revisions.
(props @danielbachhuber, #2180)
-
Permits user urls to be edited through the API.
(props @danielbachhuber, #2182)
-
Marks all Status, Type and Taxonomy fields as
readonly.(props @danielbachhuber, #2181)
-
Adds validation callbacks to collection query params.
-
Links taxonomy terms to the post type collections they support.
(props @danielbachhuber, #2167)
-
Returns error when making a
GETrequest with invalid context.(props @danielbachhuber, #2169)
-
Adds
trashstatus toGET /wp/v2/statuses.(props @danielbachhuber, #2158)
-
Indicates when fields have HTML in schema.
-
Permits viewing of User who has published any Public posts.
(props @danielbachhuber, #2155)
-
Respects
show_avatarsoption when adding avatars to Users.(props @nullvariable, #2151)
-
Controllers use
$namespaceand$rest_baseclass variables for easier subclassing.(props @danielbachhuber, #2119, #2130, #2131, #2132, #2133, #2134, #2139, #2141, #2142)