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.


Top ↑

Source

File: wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.