WordPress.org

Make WordPress Core

Ticket #22125: 22125.diff

File 22125.diff, 941 bytes (added by scribu, 6 years ago)
  • wp-includes/query.php

    diff --git wp-includes/query.php wp-includes/query.php
    index 60228db..4de0388 100644
    function set_query_var($var, $value) { 
    8787 * @return array List of posts
    8888 */
    8989function query_posts($query) {
    90         unset($GLOBALS['wp_query']);
    9190        $GLOBALS['wp_query'] = new WP_Query();
    9291        return $GLOBALS['wp_query']->query($query);
    9392}
    function query_posts($query) { 
    103102 * @uses $wp_query
    104103 */
    105104function wp_reset_query() {
    106         unset($GLOBALS['wp_query']);
    107105        $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
    108106        wp_reset_postdata();
    109107}
  • wp-settings.php

    diff --git wp-settings.php wp-settings.php
    index 470ed9a..ac331c2 100644
    $wp_the_query = new WP_Query(); 
    233233 * @global object $wp_query
    234234 * @since 1.5.0
    235235 */
    236 $wp_query =& $wp_the_query;
     236$wp_query = $wp_the_query;
    237237
    238238/**
    239239 * Holds the WordPress Rewrite object for creating pretty URLs