WordPress开发者和主题制作者的搜索引擎



get_users ›

Since3.1.0
已弃用n/a
get_users ( $args = array() )
参数:
  • (array) $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query(). for more information on accepted arguments.
    Required: No
    默认: array()
查看:
  • WP_User_Query
返回:
  • (array) List of users.
定义在:
文档:

Retrieve list of users matching criteria.



源码

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();
}