wp_list_users_args
Filter HookDescription
Filters the query arguments for the list of all users of the site.Hook Information
File Location |
wp-includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 928 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$query_args
|
The query arguments for get_users(). |
array
|
$parsed_args
|
The arguments passed to wp_list_users() combined with the defaults. |
Usage Examples
Basic Usage
<?php
// Hook into wp_list_users_args
add_filter('wp_list_users_args', 'my_custom_filter', 10, 2);
function my_custom_filter($query_args, $parsed_args) {
// Your custom filtering logic here
return $query_args;
}
Source Code Context
wp-includes/user.php:928
- How this hook is used in WordPress core
<?php
923 * @since 6.1.0
924 *
925 * @param array $query_args The query arguments for get_users().
926 * @param array $parsed_args The arguments passed to wp_list_users() combined with the defaults.
927 */
928 $query_args = apply_filters( 'wp_list_users_args', $query_args, $parsed_args );
929
930 $users = get_users( $query_args );
931
932 foreach ( $users as $user_id ) {
933 $user = get_userdata( $user_id );
PHP Documentation
<?php
/**
* Filters the query arguments for the list of all users of the site.
*
* @since 6.1.0
*
* @param array $query_args The query arguments for get_users().
* @param array $parsed_args The arguments passed to wp_list_users() combined with the defaults.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/user.php
Related Hooks
Related hooks will be displayed here in future updates.