Ticket #5439: reset_query.2.diff
File reset_query.2.diff, 851 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 global $wp_query; 29 if ( !empty($wp_query->post) ) { 30 $GLOBALS['post'] = $wp_query->post; 31 setup_postdata($wp_query->post); 32 } 28 33 } 29 34 30 35 /* -
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 }