From 073469446b8db34e34c9c6a00631da67227e9575 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 19 Sep 2019 15:49:33 +0000 Subject: [PATCH] REST API: Revert [45687]. This change may not be needed and further investigation is required before we accept it into a release. See #46907. git-svn-id: https://develop.svn.wordpress.org/trunk@46191 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/rest-api/class-wp-rest-server.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/wp-includes/rest-api/class-wp-rest-server.php b/src/wp-includes/rest-api/class-wp-rest-server.php index 7f158959e9..43e2a33b7c 100644 --- a/src/wp-includes/rest-api/class-wp-rest-server.php +++ b/src/wp-includes/rest-api/class-wp-rest-server.php @@ -103,13 +103,11 @@ class WP_REST_Server { * Checks the authentication headers if supplied. * * @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 * or no authentication provided */ - public function check_authentication( $request ) { + public function check_authentication() { /** * Filters REST authentication errors. * @@ -130,13 +128,11 @@ class WP_REST_Server { * the authentication method was used, and it succeeded. * * @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 - * method wasn't used, true if authentication succeeded. - * @param WP_REST_Request $request Full data about the request. + * @param WP_Error|null|bool WP_Error if authentication error, null if authentication + * method wasn't used, true if authentication succeeded. */ - 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'] ); } - $result = $this->check_authentication( $request ); + $result = $this->check_authentication(); if ( ! is_wp_error( $result ) ) { $result = $this->dispatch( $request );