Make WordPress Core


Ignore:
Timestamp:
10/08/2019 04:43:10 AM (7 years ago)
Author:
kadamwhite
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r46206 r46434  
    565565
    566566                foreach ( $data['_links'] as $rel => $links ) {
    567                         // Ignore links to self, for obvious reasons.
    568                         if ( 'self' === $rel ) {
    569                                 continue;
    570                         }
    571 
    572567                        $embeds = array();
    573568
Note: See TracChangeset for help on using the changeset viewer.