diff --git wp-includes/query.php wp-includes/query.php
index 04286aa..a322288 100644
|
|
class WP_Query { |
3568 | 3568 | global $wp_the_query; |
3569 | 3569 | return $wp_the_query === $this; |
3570 | 3570 | } |
| 3571 | |
| 3572 | /** |
| 3573 | * After looping through a nested query, this function |
| 3574 | * restores the $post global to the current post in this query |
| 3575 | * |
| 3576 | * @since 3.7.0 |
| 3577 | * |
| 3578 | * @return bool |
| 3579 | */ |
| 3580 | function reset_postdata() { |
| 3581 | if ( ! empty( $this->post ) ) { |
| 3582 | $GLOBALS['post'] = $this->post; |
| 3583 | setup_postdata( $this->post ); |
| 3584 | } |
| 3585 | } |
3571 | 3586 | } |
3572 | 3587 | |
3573 | 3588 | /** |