mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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) ) {
|
||||
|
||||
Reference in New Issue
Block a user