From 3671c6786d118f8bba175be24c8be5923400b0fe Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 13 Dec 2005 03:49:09 +0000 Subject: [PATCH] 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 --- wp-includes/classes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 932147770..3fc191d13 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -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;