WordPress.org

Make WordPress Core

Ticket #19631: 19631.patch

File 19631.patch, 960 bytes (added by SergeyBiryukov, 8 years ago)
  • src/wp-includes/query.php

     
    21832183                 */
    21842184                do_action_ref_array( 'pre_get_posts', array( &$this ) );
    21852185
     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
    21862201                // Shorthand.
    21872202                $q = &$this->query_vars;
    21882203