Make WordPress Core


Ignore:
Timestamp:
02/20/2020 12:53:43 AM (5 years ago)
Author:
TimothyBlynJacobs
Message:

REST API: Fix links format in OPTIONS requests for non-variable routes.

Props nsundberg, johnwatkins0, birgire.
Fixes #49149.

File:
1 edited

Legend:

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

    r47260 r47326  
    12891289            if ( strpos( $route, '{' ) === false ) {
    12901290                $data['_links'] = array(
    1291                     'self' => rest_url( $route ),
     1291                    'self' => array(
     1292                        array(
     1293                            'href' => rest_url( $route ),
     1294                        ),
     1295                    ),
    12921296                );
    12931297            }
Note: See TracChangeset for help on using the changeset viewer.