WP_Query::query( string|array $query )
Sets up the WordPress query by parsing query string.
Description Description
Parameters Parameters
- $query
-
(string|array) (Required) URL query string or array of query arguments.
Return Return
(WP_Post[]|int[]) Array of post objects or post IDs.
Source Source
File: wp-includes/class-wp-query.php
public function query( $query ) { $this->init(); $this->query = wp_parse_args( $query ); $this->query_vars = $this->query; return $this->get_posts(); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |