Ticket #12320: 12320.2.diff
File 12320.2.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/default-widgets.php
554 554 </ul> 555 555 <?php echo $after_widget; ?> 556 556 <?php 557 wp_reset_query(); // Restore global post data stomped by the_post(). 557 wp_reset_postdata(); 558 558 559 endif; 559 560 560 561 $cache[$args['widget_id']] = ob_get_flush(); -
wp-includes/query.php
75 75 function wp_reset_query() { 76 76 unset($GLOBALS['wp_query']); 77 77 $GLOBALS['wp_query'] =& $GLOBALS['wp_the_query']; 78 wp_reset_postdata(); 79 } 80 81 /** 82 * After looping through a separate query, this function restores 83 * the $post global to the last post in the main query 84 * 85 * @since 3.0.0 86 * @uses $wp_query 87 */ 88 function wp_reset_postdata() { 78 89 global $wp_query; 79 90 if ( !empty($wp_query->post) ) { 80 91 $GLOBALS['post'] = $wp_query->post;