WP_Query::__construct( string|array $query = '' )
Constructor.
Description
Sets up the WordPress query, if parameter is not empty.
See also
WP_Query::parse_query(): for all available arguments.
Parameters
- $query
-
(Optional) URL query string or array of vars.
Default value: ''
Source
File: wp-includes/class-wp-query.php
public function __construct( $query = '' ) {
if ( ! empty( $query ) ) {
$this->query( $query );
}
}
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |