From b65ceddeebfdf2f986812fdc44cb59f3b9bb7668 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 14 Sep 2012 16:26:05 +0000 Subject: [PATCH] If update_post_caches() does not receive a post type, glean post types from the individual post objects, rather than assuming 'post'. fixes #20177. git-svn-id: http://core.svn.wordpress.org/trunk@21844 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index cfdb22d360..3aeec58ecb 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -4528,8 +4528,8 @@ function update_post_caches(&$posts, $post_type = 'post', $update_term_cache = t foreach ( $posts as $post ) $post_ids[] = $post->ID; - if ( empty($post_type) ) - $post_type = 'post'; + if ( ! $post_type ) + $post_type = 'any'; if ( $update_term_cache ) { if ( is_array($post_type) ) {