WordPress/wp-includes/rest-api/endpoints
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
..
class-wp-rest-attachments-controller.php
class-wp-rest-autosaves-controller.php
class-wp-rest-block-renderer-controller.php
class-wp-rest-blocks-controller.php
class-wp-rest-comments-controller.php REST API: Allow rest_get_avatar_urls() to accept full user, post, or comment objects, rather than just an email address, to provide better flexibility for alternative avatar data. 2019-07-14 14:35:56 +00:00
class-wp-rest-controller.php REST API: Skip processing fields which are not present in the selected context. 2019-07-31 20:21:56 +00:00
class-wp-rest-post-statuses-controller.php
class-wp-rest-post-types-controller.php
class-wp-rest-posts-controller.php REST API: Generate sample permalink only when a dependent field is requested. 2019-07-31 20:00:57 +00:00
class-wp-rest-revisions-controller.php
class-wp-rest-search-controller.php
class-wp-rest-settings-controller.php
class-wp-rest-taxonomies-controller.php
class-wp-rest-terms-controller.php
class-wp-rest-themes-controller.php
class-wp-rest-users-controller.php REST API: Allow rest_get_avatar_urls() to accept full user, post, or comment objects, rather than just an email address, to provide better flexibility for alternative avatar data. 2019-07-14 14:35:56 +00:00