通过REST API查询用户时过滤WP_User_Query参数。
原型
apply_filters( 'rest_user_query', array $prepared_args, WP_REST_Request $request )
参数
$prepared_args
(array)
WP_User_Query的参数数组。
$request
(WP_REST_Request)
当前的要求。
源文件
路径:wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/rest_user_query/