mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-05 07:01:42 +01:00
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. Backportting r47511 to the 5.4 branch. Props Dudo, kadamwhite, TimothyBlynJacobs. Fixes #49648. Built from https://develop.svn.wordpress.org/branches/5.4@47563 git-svn-id: http://core.svn.wordpress.org/branches/5.4@47338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3b39d1e4a0
commit
f4270351c3
@ -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.4.1-alpha-47562';
|
$wp_version = '5.4.1-alpha-47563';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user