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: https://develop.svn.wordpress.org/trunk@21844 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c1d96d72b4
commit
6d2fc0af91
@ -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…
x
Reference in New Issue
Block a user