* Query API: WP_Query class
* The WordPress Query class.
* @link https://developer.wordpress.org/reference/classes/wp_query/
* @since 4.5.0 Removed the `$comments_popup` property.
* Query vars set by the user
* Query vars, after parsing
public $query_vars = array();
* Taxonomy query, as passed to get_tax_sql()
* @var WP_Tax_Query A taxonomy query instance.
* Metadata query container
* @var WP_Meta_Query A meta query instance.
public $meta_query = false;
* @var WP_Date_Query A date query instance.
public $date_query = false;
* Holds the data for a single object that is queried.
* Holds the contents of a post, page, category, attachment.
* @var WP_Term|WP_Post_Type|WP_Post|WP_User|null
* The ID of the queried object.
public $queried_object_id;
* SQL for the database query.
* Array of post objects or post IDs.
* The amount of posts for the current query.
* Index of the current item in the loop.
public $current_post = -1;
* Whether the loop has started and the caller is in the loop.
public $in_the_loop = false;
* This property does not get populated when the `fields` argument is set to
* The list of comments for current post.
* The amount of comments for the posts.
public $comment_count = 0;
* The index of the comment in the comment loop.
public $current_comment = -1;
* Current comment object.
* The amount of found posts for the current query.
* If limit clause was not used, equals $post_count.
public $max_num_pages = 0;
* The amount of comment pages.
public $max_num_comment_pages = 0;
* Signifies whether the current query is for a single post.
public $is_single = false;
* Signifies whether the current query is for a preview.
public $is_preview = false;
* Signifies whether the current query is for a page.
* Signifies whether the current query is for an archive.
public $is_archive = false;
* Signifies whether the current query is for a date archive.
* Signifies whether the current query is for a year archive.
* Signifies whether the current query is for a month archive.
public $is_month = false;
* Signifies whether the current query is for a day archive.
* Signifies whether the current query is for a specific time.
* Signifies whether the current query is for an author archive.
public $is_author = false;
* Signifies whether the current query is for a category archive.
public $is_category = false;
* Signifies whether the current query is for a tag archive.
* Signifies whether the current query is for a taxonomy archive.
* Signifies whether the current query is for a search.
public $is_search = false;
* Signifies whether the current query is for a feed.
* Signifies whether the current query is for a comment feed.
public $is_comment_feed = false;
* Signifies whether the current query is for trackback endpoint call.
public $is_trackback = false;
* Signifies whether the current query is for the site homepage.
* Signifies whether the current query is for the Privacy Policy page.
public $is_privacy_policy = false;
* Signifies whether the current query couldn't find anything.
* Signifies whether the current query is for an embed.
public $is_embed = false;
* Signifies whether the current query is for a paged result and not for the first page.
public $is_paged = false;
* Signifies whether the current query is for an administrative interface page.
public $is_admin = false;
* Signifies whether the current query is for an attachment page.
public $is_attachment = false;
* Signifies whether the current query is for an existing single post of any post type
* (post, attachment, page, custom post types).
public $is_singular = false;
* Signifies whether the current query is for the robots.txt file.
public $is_robots = false;
* Signifies whether the current query is for the favicon.ico file.
public $is_favicon = false;
* Signifies whether the current query is for the page_for_posts page.
* Basically, the homepage if the option isn't set for the static homepage.
public $is_posts_page = false;
* Signifies whether the current query is for a post type archive.
public $is_post_type_archive = false;
* Stores the ->query_vars state like md5(serialize( $this->query_vars ) ) so we know
* whether we have to re-parse because something has changed
private $query_vars_hash = false;
* Whether query vars have changed since the initial parse_query() call. Used to catch modifications to query vars made
* via pre_get_posts hooks.
private $query_vars_changed = true;
* Set if post thumbnails are cached
public $thumbnails_cached = false;
* Controls whether an attachment query should include filenames or not.
protected $allow_query_attachment_by_filename = false;
* Cached list of search stopwords.
private $compat_fields = array( 'query_vars_hash', 'query_vars_changed' );
private $compat_methods = array( 'init_query_flags', 'parse_tax_query' );
* Resets query flags to false.
* The query flags are what page info WordPress was able to figure out.
private function init_query_flags() {
$this->is_single = false;
$this->is_preview = false;
$this->is_archive = false;
$this->is_author = false;
$this->is_category = false;
$this->is_search = false;
$this->is_comment_feed = false;
$this->is_trackback = false;
$this->is_privacy_policy = false;
$this->is_attachment = false;
$this->is_singular = false;
$this->is_robots = false;
$this->is_favicon = false;
$this->is_posts_page = false;