mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-08 16:41:44 +01:00
REST API: Remove the Location header redirect for the /users/me endpoint.
Props youknowriad jnylen0. Fixes #38521. Built from https://develop.svn.wordpress.org/trunk@38980 git-svn-id: http://core.svn.wordpress.org/trunk@38923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a6d3ba96e8
commit
d42acc530c
@ -288,8 +288,6 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
|||||||
$user = wp_get_current_user();
|
$user = wp_get_current_user();
|
||||||
$response = $this->prepare_item_for_response( $user, $request );
|
$response = $this->prepare_item_for_response( $user, $request );
|
||||||
$response = rest_ensure_response( $response );
|
$response = rest_ensure_response( $response );
|
||||||
$response->header( 'Location', rest_url( sprintf( '%s/%s/%d', $this->namespace, $this->rest_base, $current_user_id ) ) );
|
|
||||||
$response->set_status( 302 );
|
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-alpha-38979';
|
$wp_version = '4.7-alpha-38980';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user