Make WordPress Core

Ticket #47684: 47684.diff

File 47684.diff, 704 bytes (added by chrisvanpatten, 5 years ago)

Initial patch

  • src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php

    diff --git src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php src/wp-includes/rest-api/search/class-wp-rest-post-search-handler.php
    index de42663aa4..5c763abf93 100644
    class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler { 
    151151                $item_route = $this->detect_rest_item_route( $post );
    152152                if ( ! empty( $item_route ) ) {
    153153                        $links['self'] = array(
     154                                'href' => rest_url( $item_route ),
     155                        );
     156
     157                        $links['original'] = array(
    154158                                'href'       => rest_url( $item_route ),
    155159                                'embeddable' => true,
    156160                        );