REST API: Support dot.nested hierarchical properties in _fields query parameter.

Enable clients to opt-in to receipt of one or more specific sub-properties within a response, and not other sub-properties.
Skip potentially expensive filtering and processing for post resources which were explicitly not requested.

Props kadamwhite, TimothyBlynJacobs, dlh.
Fixes #42094.


git-svn-id: https://develop.svn.wordpress.org/trunk@46184 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
K. Adam White
2019-09-19 14:04:51 +00:00
parent 5f1cbd7165
commit b926baa51d
6 changed files with 271 additions and 43 deletions
@@ -232,7 +232,7 @@ class WP_Test_REST_Controller extends WP_Test_REST_TestCase {
public function data_get_fields_for_response() {
return array(
array(
'somestring,someinteger',
'somestring,someinteger,someinvalidkey',
array(
'somestring',
'someinteger',