W3cubDocs

/WordPress

WP_User_Query::__construct( null|string|array $query = null )

Constructor.

Parameters

$querynull|string|arrayoptional
The query variables.
See WP_User_Query::prepare_query() for information on accepted arguments.

Default:null

Source

public function __construct( $query = null ) {
	if ( ! empty( $query ) ) {
		$this->prepare_query( $query );
		$this->query();
	}
}

Changelog

Version Description
3.1.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_user_query/__construct