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:
parent
2343663e0b
commit
3671c6786d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue