REST API: Permit embedding of the 'self' link relation in the /search endpoint.
Removes a special-case prohibition against embedding 'self' which prevented ?_embed from being used with the /wp/v2/search endpoint. Props TimothyBlynJacobs, chrisvanpatten, kadamwhite. Fixes #47684. Built from https://develop.svn.wordpress.org/trunk@46434 git-svn-id: http://core.svn.wordpress.org/trunk@46232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de6d164870
commit
5815551dfe
|
@ -564,11 +564,6 @@ class WP_REST_Server {
|
|||
$embedded = array();
|
||||
|
||||
foreach ( $data['_links'] as $rel => $links ) {
|
||||
// Ignore links to self, for obvious reasons.
|
||||
if ( 'self' === $rel ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$embeds = array();
|
||||
|
||||
foreach ( $links as $item ) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.3-beta2-46433';
|
||||
$wp_version = '5.3-beta2-46434';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue