rest_user_query WordPress Filter Hook
The rest_user_query hook is used to modify the query parameters before a request is made to the WordPress REST API. This hook gives you the ability to change the default behavior of the WordPress REST API for user requests.
apply_filters( 'rest_user_query', array $prepared_args , WP_REST_Request $request ) #
Filters WP_User_Query arguments when querying users via the REST API.
Parameters
- $prepared_args
(array)Array of arguments for WP_User_Query.
- $request
(WP_REST_Request)The REST API request.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |