Make WordPress Core

Changeset 52796


Ignore:
Timestamp:
02/24/2022 10:34:56 PM (2 years ago)
Author:
spacedmonkey
Message:

REST API: Pass WP_REST_Request object to the rest_index filter.

Props johnregan3, TimothyBlynJacobs, Spacedmonkey, hasanuzzamanshamim.
Fixes #48638.

File:
1 edited

Legend:

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

    r52640 r52796  
    12401240         *
    12411241         * @since 4.4.0
     1242         * @since 6.0.0 Added `$request` parameter.
    12421243         *
    12431244         * @param WP_REST_Response $response Response data.
    1244          */
    1245         return apply_filters( 'rest_index', $response );
     1245         * @param WP_REST_Request  $request  Request data.
     1246         */
     1247        return apply_filters( 'rest_index', $response, $request );
    12461248    }
    12471249
Note: See TracChangeset for help on using the changeset viewer.