WordPress.org

Make WordPress Core

Changeset 11400


Ignore:
Timestamp:
05/19/2009 04:16:15 PM (10 years ago)
Author:
ryan
Message:

Reset post-related globals in wp_reset_query(). Props Denis-de-Bernardy. fixes #9256

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r11399 r11400  
    7474 */
    7575function wp_reset_query() {
    76     unset($GLOBALS['wp_query']);
     76    foreach ( array('id', 'authordata', 'day', 'currentmonth', 'page', 'pages', 'multipage', 'more', 'numpages', 'post', 'wp_query') as $var )
     77        unset($GLOBALS[$var]);
    7778    $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query'];
    7879    global $wp_query;
Note: See TracChangeset for help on using the changeset viewer.