mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 21:39:50 +01:00
REST API: Pass WP_REST_Request
object to the rest_index filter.
Props johnregan3, TimothyBlynJacobs, Spacedmonkey, hasanuzzamanshamim. Fixes #48638. git-svn-id: https://develop.svn.wordpress.org/trunk@52796 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
16cd22183d
commit
f4addf3ff5
@ -1239,10 +1239,12 @@ class WP_REST_Server {
|
||||
* available on the API, and a small amount of data about the site.
|
||||
*
|
||||
* @since 4.4.0
|
||||
* @since 6.0.0 Added `$request` parameter.
|
||||
*
|
||||
* @param WP_REST_Response $response Response data.
|
||||
* @param WP_REST_Request $request Request data.
|
||||
*/
|
||||
return apply_filters( 'rest_index', $response );
|
||||
return apply_filters( 'rest_index', $response, $request );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user