rest_user_collection_params WordPress Filter Hook
The rest_user_collection_params hook allows you to modify the parameters that are used to query the users collection. This hook gives you the ability to add or remove parameters as well as modify the default values of existing parameters.
apply_filters( 'rest_user_collection_params', array $query_params ) #
Filters REST API collection parameters for the users controller.
Description
This filter registers the collection parameter, but does not map the collection parameter to an internal WP_User_Query parameter. Use the rest_user_query
filter to set WP_User_Query arguments.
Parameters
- $query_params
(array)JSON Schema-formatted collection parameters.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |