Ticket #5439: reset_query.diff
File reset_query.diff, 831 bytes (added by , 17 years ago) |
---|
-
wp-includes/query.php
25 25 function wp_reset_query() { 26 26 unset($GLOBALS['wp_query']); 27 27 $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; 28 if ( !empty($wp_query->post) ) { 29 $GLOBALS['post'] = $wp_query->post; 30 setup_postdata($wp_query->post); 31 } 28 32 } 29 33 30 34 /* -
wp-includes/widgets.php
874 874 </ul> 875 875 <?php echo $after_widget; ?> 876 876 <?php 877 wp_reset_query(); // Restore global post data stomped by the_post(). 877 878 endif; 878 879 wp_cache_add('widget_recent_entries', ob_get_flush()); 879 880 }