Ticket #14821: 14821.2.patch
File 14821.2.patch, 1.7 KB (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 ); 4098 4102 4099 if ( !is_array($post_type) && 'any' != $post_type &&$update_term_cache )4103 if ( $update_term_cache ) 4100 4104 update_object_term_cache($post_ids, $post_type); 4101 4105 4102 4106 if ( $update_meta_cache ) -
taxonomy.php
2214 2214 * 2215 2215 * @param string|array $object_ids Single or list of term object ID(s) 2216 2216 * @param array|string $object_type The taxonomy object type 2217 * @return null|bool Null value is given with empty $object_ids. False if 2217 * @return null|bool Null value is given with empty $object_ids. False if all 2218 * terms for each object are already cached. 2218 2219 */ 2219 2220 function update_object_term_cache($object_ids, $object_type) { 2220 2221 if ( empty($object_ids) ) … … 2224 2225 $object_ids = explode(',', $object_ids); 2225 2226 2226 2227 $object_ids = array_map('intval', $object_ids); 2228 $taxonomies = array(); 2227 2229 2228 $taxonomies = get_object_taxonomies($object_type); 2230 foreach ( (array) $object_type as $type ) 2231 $taxonomies = array_merge( $taxonomies, get_object_taxonomies($type) ); 2229 2232 2230 2233 $ids = array(); 2231 2234 foreach ( (array) $object_ids as $id ) {