WordPress/wp-includes/rest-api
Gary Pendergast 595cd450eb REST API: Filter responses based on the _fields parameter, before data is processed.
Historically, the REST API would generate the entire response object, including running expensive filters, then it would apply the `_fields` parameter, discarding the fields that weren't specificed.

This change causes `_fields` to be applied earlier, so that only requested fields are processed.

Merges [43087] to the 4.9 branch.

Props danielbachhuber.
See #43874.


Built from https://develop.svn.wordpress.org/branches/4.9@43445


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-13 06:51:27 +00:00
..
endpoints REST API: Filter responses based on the _fields parameter, before data is processed. 2018-07-13 06:51:27 +00:00
fields Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-rest-request.php Docs: Replace HTTP links to stackoverflow.com in DocBlocks with HTTPS. 2017-07-30 14:52:44 +00:00
class-wp-rest-response.php Docs: Remove @access notations from method DocBlocks in wp-includes/* classes. 2017-07-27 00:41:44 +00:00
class-wp-rest-server.php REST API: Return the proper status code for failed permission callbacks in WP_REST_Server->dispatch(). 2017-12-30 20:49:40 +00:00