Changeset 14607
- Timestamp:
- 05/13/2010 08:39:54 PM (15 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r14486 r14607 555 555 <?php echo $after_widget; ?> 556 556 <?php 557 wp_reset_query(); // Restore global post data stomped by the_post(). 557 // Reset the global $the_post as this query will have stomped on it 558 wp_reset_postdata(); 559 558 560 endif; 559 561 -
trunk/wp-includes/query.php
r14603 r14607 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 current 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) ) {
Note: See TracChangeset
for help on using the changeset viewer.