Changeset 14528 for trunk/wp-includes/post.php
- Timestamp:
- 05/10/2010 12:58:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r14521 r14528 4004 4004 * 4005 4005 * @param array $posts Array of Post objects 4006 * @param string $post_type The post type of the posts in $posts 4007 */ 4008 function update_post_caches(&$posts, $post_type = 'post') { 4006 * @param string $post_type The post type of the posts in $posts. Default is 'post'. 4007 * @param bool $update_term_cache Whether to update the term cache. Default is true. 4008 * @param bool $update_meta_cache Whether to update the meta cache. Default is true. 4009 */ 4010 function update_post_caches(&$posts, $post_type = 'post', $update_term_cache = true, $update_meta_cache = true) { 4009 4011 // No point in doing all this work if we didn't match any posts. 4010 4012 if ( !$posts ) … … 4020 4022 $post_type = 'post'; 4021 4023 4022 if ( !is_array($post_type) && 'any' != $post_type )4024 if ( !is_array($post_type) && 'any' != $post_type && $update_term_cache ) 4023 4025 update_object_term_cache($post_ids, $post_type); 4024 4026 4025 update_postmeta_cache($post_ids); 4027 if ( $update_meta_cache ) 4028 update_postmeta_cache($post_ids); 4026 4029 } 4027 4030
Note: See TracChangeset
for help on using the changeset viewer.