Fires after the query variable object is created, but before the actual query is run.
Description
Note: If using conditional tags, use the method versions within the passed instance (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions like is_main_query() test against the global $wp_query instance, not the passed one.
1904* like is_main_query() test against the global$wp_query instance, not the passed one.1905*1906* @since 2.0.01907*1908* @param WP_Query$query The WP_Query instance(passed by reference).1909*/1910do_action_ref_array('pre_get_posts',array(&$this));19111912// Shorthand.1913$q=&$this->query_vars;19141915// Fill again in case 'pre_get_posts' unset some vars.1916$q=$this->fill_query_vars($q);
History
Introduced in 2.0.0. Unchanged from 6.7.7 through 7.1.0.