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: http://svn.automattic.com/wordpress/trunk@3300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-13 03:49:09 +00:00
parent 2343663e0b
commit 3671c6786d

View File

@ -658,14 +658,14 @@ 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;
return $this->posts;