mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
REST API: Revert [45687].
This change may not be needed and further investigation is required before we accept it into a release. See #46907. Built from https://develop.svn.wordpress.org/trunk@46191 git-svn-id: http://core.svn.wordpress.org/trunk@46003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1fb85addf9
commit
6c931ed61a
@ -103,13 +103,11 @@ class WP_REST_Server {
|
|||||||
* Checks the authentication headers if supplied.
|
* Checks the authentication headers if supplied.
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
* @since 5.3.0 Added the `$request` parameter.
|
|
||||||
*
|
*
|
||||||
* @param WP_REST_Request $request Full data about the request.
|
|
||||||
* @return WP_Error|null WP_Error indicates unsuccessful login, null indicates successful
|
* @return WP_Error|null WP_Error indicates unsuccessful login, null indicates successful
|
||||||
* or no authentication provided
|
* or no authentication provided
|
||||||
*/
|
*/
|
||||||
public function check_authentication( $request ) {
|
public function check_authentication() {
|
||||||
/**
|
/**
|
||||||
* Filters REST authentication errors.
|
* Filters REST authentication errors.
|
||||||
*
|
*
|
||||||
@ -130,13 +128,11 @@ class WP_REST_Server {
|
|||||||
* the authentication method was used, and it succeeded.
|
* the authentication method was used, and it succeeded.
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
* @since 5.3.0 Added the `$request` argument.
|
|
||||||
*
|
*
|
||||||
* @param WP_Error|null|bool $result WP_Error if authentication error, null if authentication
|
* @param WP_Error|null|bool WP_Error if authentication error, null if authentication
|
||||||
* method wasn't used, true if authentication succeeded.
|
* method wasn't used, true if authentication succeeded.
|
||||||
* @param WP_REST_Request $request Full data about the request.
|
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'rest_authentication_errors', null, $request );
|
return apply_filters( 'rest_authentication_errors', null );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -327,7 +323,7 @@ class WP_REST_Server {
|
|||||||
$request->set_method( $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] );
|
$request->set_method( $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->check_authentication( $request );
|
$result = $this->check_authentication();
|
||||||
|
|
||||||
if ( ! is_wp_error( $result ) ) {
|
if ( ! is_wp_error( $result ) ) {
|
||||||
$result = $this->dispatch( $request );
|
$result = $this->dispatch( $request );
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-46190';
|
$wp_version = '5.3-alpha-46191';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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