WordPress.org

Make WordPress Core

Ticket #5121: save_fist_wp_query_to_wp_the_query.patch

File save_fist_wp_query_to_wp_the_query.patch, 449 bytes (added by 082net, 7 years ago)
  • wp-includes/functions.php

     
    726726} 
    727727 
    728728function wp($query_vars = '') { 
    729         global $wp; 
     729        global $wp, $wp_query, $wp_the_query; 
    730730 
    731731        $wp->main($query_vars); 
     732 
     733        if( !isset($wp_the_query) ) 
     734                $wp_the_query = $wp_query; 
    732735} 
    733736 
    734737function get_status_header_desc( $code ) {