| | 2186 | if ( ! is_admin() && $this->is_main_query() ) { |
| | 2187 | /** |
| | 2188 | * Fires after the query variable object is created, but before the actual query is run. |
| | 2189 | * |
| | 2190 | * Note: If using conditional tags, use the method versions within the passed instance |
| | 2191 | * (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions |
| | 2192 | * like is_main_query() test against the global $wp_query instance, not the passed one. |
| | 2193 | * |
| | 2194 | * @since 4.0.0 |
| | 2195 | * |
| | 2196 | * @param WP_Query &$this The WP_Query instance (passed by reference). |
| | 2197 | */ |
| | 2198 | do_action_ref_array( 'pre_main_query', array( &$this ) ); |
| | 2199 | } |
| | 2200 | |