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
This commit is contained in:
Andrew Nacin 2012-09-14 16:26:05 +00:00
parent e728ad3a1e
commit b65ceddeeb

View File

@ -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) ) {