mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
REST API: Use WP_REST_Request::from_url() when embedding.
See #35803. git-svn-id: https://develop.svn.wordpress.org/trunk@36674 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -492,7 +492,9 @@ class Tests_REST_Server extends WP_Test_REST_TestCase {
|
||||
) );
|
||||
|
||||
$response = new WP_REST_Response();
|
||||
$response->add_link( 'alternate', rest_url( '/test/embeddable?parsed_params=yes' ), array( 'embeddable' => true ) );
|
||||
$url = rest_url( '/test/embeddable' );
|
||||
$url = add_query_arg( 'parsed_params', 'yes', $url );
|
||||
$response->add_link( 'alternate', $url, array( 'embeddable' => true ) );
|
||||
|
||||
$data = $this->server->response_to_data( $response, true );
|
||||
|
||||
@@ -514,7 +516,9 @@ class Tests_REST_Server extends WP_Test_REST_TestCase {
|
||||
) );
|
||||
|
||||
$response = new WP_REST_Response();
|
||||
$response->add_link( 'up', rest_url( '/test/embeddable?error=1' ), array( 'embeddable' => true ) );
|
||||
$url = rest_url( '/test/embeddable' );
|
||||
$url = add_query_arg( 'error', '1', $url );
|
||||
$response->add_link( 'up', $url, array( 'embeddable' => true ) );
|
||||
|
||||
$data = $this->server->response_to_data( $response, true );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user