WordPress/wp-includes/rest-api
K. Adam White 5f9ba92af4 REST API: Skip processing fields which are not present in the selected context.
In `WP_REST_Controller::get_fields_for_response()`, exclude fields which are not registered to appear in the request's context.

In conjunction with r45705 this prevents the unnecessary computation of the sample permalink when making a request that is not context=edit.

Props dlh.
Fixes #45605.

Built from https://develop.svn.wordpress.org/trunk@45706


git-svn-id: http://core.svn.wordpress.org/trunk@45517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-31 20:21:56 +00:00
..
endpoints REST API: Skip processing fields which are not present in the selected context. 2019-07-31 20:21:56 +00:00
fields REST API: Make "Could not update meta value in database" error messages more helpful. 2019-07-26 13:20:56 +00:00
search Docs: Add missing `@see` tag to `WP_REST_Post_Search_Handler` DocBlock. 2019-05-14 15:00:07 +00:00
class-wp-rest-request.php Code Modernisation: Fix known instances of array access on data types that can't be accessed as arrays. 2019-07-15 06:25:57 +00:00
class-wp-rest-response.php Docs: Correct and improve various inline documentation. 2018-08-27 14:28:26 +00:00
class-wp-rest-server.php REST API: Pass current request object to `rest_authentication_errors` filter in `WP_REST_Server::check_authentication()`. 2019-07-27 13:44:57 +00:00