Class: WP_User_Search

WordPress User Search class.


Properties

Name Type(s) Default Value Summary
results mixed {@internal Missing Description}}
search_term string {@internal Missing Description}}
page integer Page number.
role string Role name that users have.
raw_page integer | boolean Raw page number.
users_per_page integer Amount of users to display per page.
first_user integer {@internal Missing Description}}
last_user integer {@internal Missing Description}}
query_limit string {@internal Missing Description}}
query_orderby string {@internal Missing Description}}
query_from string {@internal Missing Description}}
query_where string {@internal Missing Description}}
total_users_for_query integer {@internal Missing Description}}
too_many_total_users boolean {@internal Missing Description}}
search_errors WP_Error {@internal Missing Description}}
paging_text string {@internal Missing Description}}

Methods

WP_User_Search:: __construct( string $search_term = '', integer $page = '', string $role = '' )

PHP5 Constructor - Sets up the object properties. Since 2.1.0.

Arguments

Name Type(s) Default Value Description
$search_term string

Search terms string.

$page integer

Optional. Page ID.

$role string

Role name.

Returns

WP_User_Search


WP_User_Search:: do_paging( )

Handles paging for the user search query. Since 2.1.0.


WP_User_Search:: get_results( )

Retrieves the user search query results. Since 2.1.0.

Returns

array


Whether there are search terms. Since 2.1.0.

Returns

boolean


Displaying paging text. Since 2.1.0.


WP_User_Search:: prepare_query( )

Prepares the user search query (legacy). Since 2.1.0.


WP_User_Search:: prepare_vars_for_template_usage( )

Prepares variables for use in templates. Since 2.1.0.


WP_User_Search:: query( )

Executes the user search query. Since 2.1.0.


WP_User_Search:: results_are_paged( )

Whether paging is enabled. Since 2.1.0.

Returns

boolean


PHP4 Constructor - Sets up the object properties. Since 2.1.0.

Arguments

Name Type(s) Default Value Description
$search_term string

Search terms string.

$page integer

Optional. Page ID.

$role string

Role name.

Returns

WP_User_Search


WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.