Uses
| Uses | Description |
|---|---|
| wp-includes/functions.php: wp_parse_args() | Merge user defined arguments into defaults array. |
| wp-includes/class-wp-user-query.php: WP_User_Query::__construct() | PHP5 constructor. |
Retrieve list of users matching criteria.
(array) (Optional) Arguments to retrieve users. See WP_User_Query::prepare_query(). for more information on accepted arguments.
Default value: array()
(array) List of users.
Return value is an array of IDs, stdClass objects, or WP_User objects, depending on the value of the ‘fields‘ parameter.
File: wp-includes/user.php
function get_users( $args = array() ) {
$args = wp_parse_args( $args );
$args['count_total'] = false;
$user_search = new WP_User_Query( $args );
return (array) $user_search->get_results();
} | Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_users