mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 10:14:31 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user