mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
REST API: Pass correct context to embedded items.
Fixes a regression introduced in [57623] where navigation embed items were missing `raw` property values. Props mamaduka, swissspidy, youknowriad, timothyblynjacobs. Fixes #43439. Built from https://develop.svn.wordpress.org/trunk@57659 git-svn-id: http://core.svn.wordpress.org/trunk@57160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
69d6a9e5a0
commit
3394082032
@ -743,6 +743,11 @@ class WP_REST_Server {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Embedded resources get passed context=embed.
|
||||
if ( empty( $request['context'] ) ) {
|
||||
$request['context'] = 'embed';
|
||||
}
|
||||
|
||||
if ( empty( $request['per_page'] ) ) {
|
||||
$matched = $this->match_request_to_handler( $request );
|
||||
if ( ! is_wp_error( $matched ) && isset( $matched[1]['args']['per_page']['maximum'] ) ) {
|
||||
@ -750,11 +755,6 @@ class WP_REST_Server {
|
||||
}
|
||||
}
|
||||
|
||||
// Embedded resources get passed context=embed.
|
||||
if ( empty( $request['context'] ) ) {
|
||||
$request['context'] = 'embed';
|
||||
}
|
||||
|
||||
$response = $this->dispatch( $request );
|
||||
|
||||
/** This filter is documented in wp-includes/rest-api/class-wp-rest-server.php */
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-beta1-57658';
|
||||
$wp_version = '6.5-beta1-57659';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user