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:
parent
e728ad3a1e
commit
b65ceddeeb
|
@ -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) ) {
|
||||
|
|
Loading…
Reference in New Issue