Update post cache before running the_posts filter. Since we already retrieved them, might as well cache them even if they are filtered out by plugins later.

git-svn-id: https://develop.svn.wordpress.org/trunk@3300 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-12-13 03:49:09 +00:00
parent 5a02ae79af
commit f4579af67b
1 changed files with 2 additions and 2 deletions

View File

@ -658,13 +658,13 @@ class WP_Query {
}
}
update_post_caches($this->posts);
$this->posts = apply_filters('the_posts', $this->posts);
$this->post_count = count($this->posts);
if ($this->post_count > 0) {
$this->post = $this->posts[0];
}
update_post_caches($this->posts);
// Save any changes made to the query vars.
$this->query_vars = $q;