Make WordPress Core

Changeset 46191


Ignore:
Timestamp:
09/19/2019 03:49:33 PM (4 years ago)
Author:
kadamwhite
Message:

REST API: Revert [45687].

This change may not be needed and further investigation is required before we accept it into a release.

See #46907.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/class-wp-rest-server.php

    r45809 r46191  
    104104     *
    105105     * @since 4.4.0
    106      * @since 5.3.0 Added the `$request` parameter.
    107      *
    108      * @param WP_REST_Request $request Full data about the request.
     106     *
    109107     * @return WP_Error|null WP_Error indicates unsuccessful login, null indicates successful
    110108     *                       or no authentication provided
    111109     */
    112     public function check_authentication( $request ) {
     110    public function check_authentication() {
    113111        /**
    114112         * Filters REST authentication errors.
     
    131129         *
    132130         * @since 4.4.0
    133          * @since 5.3.0 Added the `$request` argument.
    134          *
    135          * @param WP_Error|null|bool $result  WP_Error if authentication error, null if authentication
    136          *                                    method wasn't used, true if authentication succeeded.
    137          * @param WP_REST_Request    $request Full data about the request.
    138          */
    139         return apply_filters( 'rest_authentication_errors', null, $request );
     131         *
     132         * @param WP_Error|null|bool WP_Error if authentication error, null if authentication
     133         *                              method wasn't used, true if authentication succeeded.
     134         */
     135        return apply_filters( 'rest_authentication_errors', null );
    140136    }
    141137
     
    328324        }
    329325
    330         $result = $this->check_authentication( $request );
     326        $result = $this->check_authentication();
    331327
    332328        if ( ! is_wp_error( $result ) ) {
Note: See TracChangeset for help on using the changeset viewer.