REST API: Fix _fields filtering of registered rest fields.
Use rest_is_field_included when determining which additional fields to include to permit filtering by nested field properties. Props Dudo, kadamwhite, TimothyBlynJacobs. Fixes #49648. Built from https://develop.svn.wordpress.org/trunk@47511 git-svn-id: http://core.svn.wordpress.org/trunk@47286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7dbad241cb
commit
58d5aad2a3
|
@ -451,7 +451,7 @@ abstract class WP_REST_Controller {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! in_array( $field_name, $requested_fields, true ) ) {
|
if ( ! rest_is_field_included( $field_name, $requested_fields ) ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-alpha-47510';
|
$wp_version = '5.5-alpha-47511';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue