Break global post ref so we don't pollute queries. see #9854
git-svn-id: https://develop.svn.wordpress.org/trunk@11382 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e170a4d6c1
commit
c6debe7b9e
@ -2383,6 +2383,7 @@ class WP_Query {
|
||||
function the_post() {
|
||||
global $post;
|
||||
$this->in_the_loop = true;
|
||||
unset($post); // Break the ref
|
||||
$post = $this->next_post();
|
||||
setup_postdata($post);
|
||||
do_action('the_post', $post);
|
||||
|
Loading…
x
Reference in New Issue
Block a user