WordPress/wp-includes/rest-api
Sergey Biryukov ff3ea55f76 REST API: Include fields with null schema in get_fields_for_response().
In [43736], we prevented rendering fields when not present in `?_fields=`. However, because `get_fields_for_response()` is dependent on `get_item_schema()`, any custom fields registered with a null schema would be incorrectly excluded from the response. Because the REST API permits a null schema for `register_rest_field()`, those fields should be included in the available fields for a response.

Props danielbachhuber.
Merges [43908] to trunk.
Fixes #45220.
Built from https://develop.svn.wordpress.org/trunk@44254


git-svn-id: http://core.svn.wordpress.org/trunk@44084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 03:29:47 +00:00
..
endpoints REST API: Include fields with null schema in get_fields_for_response(). 2018-12-17 03:29:47 +00:00
fields REST API: Slash existing meta values when comparing with incoming meta upates. 2018-12-13 16:30:37 +00:00
search REST API: Introduce controller for searching across post types. 2018-12-13 09:38:25 +00:00
class-wp-rest-request.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:51:36 +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 Docs: Correct and improve various inline documentation. 2018-08-27 14:28:26 +00:00