WP_User_Query::__construct() WordPress Method

The WP_User_Query::__construct() method is used to instantiate a new WP_User_Query object. This object can then be used to query the WordPress user database.

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

PHP5 constructor.


Parameters

$query

(null|string|array)(Optional) The query variables.

Default value: null


Top ↑

Source

File: wp-includes/class-wp-user-query.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.