REST API: Remove the Location redirect for the /users/me endpoint.

This is a re-commit of [38980], which was reverted in [38990].

Props youknowriad, jnylen0, pento.
Fixes #38521.

Built from https://develop.svn.wordpress.org/trunk@39085


git-svn-id: http://core.svn.wordpress.org/trunk@39027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan McCue 2016-11-02 03:44:30 +00:00
parent 08ea66490b
commit ba039f7546
2 changed files with 1 additions and 3 deletions

View File

@ -343,8 +343,6 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
$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;
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-beta1-39084'; $wp_version = '4.7-beta1-39085';
/** /**
* 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.