REST API: Pass `WP_REST_Request` object to the rest_index filter.
Props johnregan3, TimothyBlynJacobs, Spacedmonkey, hasanuzzamanshamim. Fixes #48638. Built from https://develop.svn.wordpress.org/trunk@52796 git-svn-id: http://core.svn.wordpress.org/trunk@52385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
631f08096b
commit
2ae4784ca0
|
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52795';
|
||||
$wp_version = '6.0-alpha-52796';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue