Make WordPress Core

Ticket #45189: 45189.diff

File 45189.diff, 743 bytes (added by schlessera, 5 years ago)
  • src/wp-includes/rest-api.php

    diff --git src/wp-includes/rest-api.php src/wp-includes/rest-api.php
    index e1d8919c8d..fb696a56ac 100644
    function rest_preload_api_request( $memo, $path ) { 
    13581358        if ( 200 === $response->status ) {
    13591359                $server = rest_get_server();
    13601360                $data   = (array) $response->get_data();
    1361                 if ( method_exists( $server, 'get_compact_response_links' ) ) {
    1362                         $links = call_user_func( array( $server, 'get_compact_response_links' ), $response );
    1363                 } else {
    1364                         $links = call_user_func( array( $server, 'get_response_links' ), $response );
    1365                 }
     1361                $links  = $server->get_compact_response_links( $response );
    13661362                if ( ! empty( $links ) ) {
    13671363                        $data['_links'] = $links;
    13681364                }