[wp-trac] [WordPress Trac] #42094: REST API: extend _fields parameter to selectively include nested fields in response JSON
WordPress Trac
noreply at wordpress.org
Tue May 21 15:29:57 UTC 2019
#42094: REST API: extend _fields parameter to selectively include nested fields in
response JSON
-------------------------------------------------+-------------------------
Reporter: kadamwhite | Owner: kadamwhite
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.3
Component: REST API | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch dev-feedback needs- | Focuses:
testing has-unit-tests |
-------------------------------------------------+-------------------------
Comment (by TimothyBlynJacobs):
FWIW, I think extracting those as generic array utilities would be
immensely helpful. I've had to implement similar things in other contexts,
and having core functions for that would be helpful.
Perhaps the filtering by dotted fields could be a part of `WP_List_Util`?
And then extract `is_field_included` into a standalone function?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42094#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list