Ticket #14821: 14821.patch
File 14821.patch, 961 bytes (added by , 15 years ago) |
---|
-
post.php
4089 4089 4090 4090 update_post_cache($posts); 4091 4091 4092 $post_ids = array();4093 foreach ( $posts as $post ) 4092 $post_ids = $post_types = array(); 4093 foreach ( $posts as $post ) { 4094 4094 $post_ids[] = $post->ID; 4095 $post_types[] = $post->post_type; 4096 } 4095 4097 4096 4098 if ( empty($post_type) ) 4097 $post_type = 'post'; 4099 $post_type = array_unique( $post_types ); 4100 else if ( 'any' == $post_type ) 4101 $post_type = array_unique( $post_types ); 4102 else if ( !is_array( $post_type ) ) 4103 $post_type = array( $post_type ); 4098 4104 4099 if ( !is_array($post_type) && 'any' != $post_type && $update_term_cache ) 4100 update_object_term_cache($post_ids, $post_type); 4105 if ( $update_term_cache ) { 4106 foreach ( $post_type as $type ) 4107 update_object_term_cache($post_ids, $type); 4108 } 4101 4109 4102 4110 if ( $update_meta_cache ) 4103 4111 update_postmeta_cache($post_ids);