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

In this article

PHP5 Constructor – Sets up the object properties.

Parameters

$search_termstringoptional
Search terms string.

Default:''

$pageintoptional
Page ID.

Default:''

$rolestringoptional
Role name.

Default:''

Return

WP_User_Search

Source

function __construct( $search_term = '', $page = '', $role = '' ) {
	_deprecated_class( 'WP_User_Search', '3.1.0', 'WP_User_Query' );

	$this->search_term = wp_unslash( $search_term );
	$this->raw_page = ( '' == $page ) ? false : (int) $page;
	$this->page = ( '' == $page ) ? 1 : (int) $page;
	$this->role = $role;

	$this->prepare_query();
	$this->query();
	$this->do_paging();
}

Changelog

VersionDescription
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.