Changeset 14528
- Timestamp:
- 05/10/2010 12:58:39 AM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu.php
r14450 r14528 414 414 415 415 if ( ! empty( $items ) ) { 416 $defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true ); 416 $defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true, 417 'update_post_term_cache' => false); 417 418 $args = wp_parse_args( $args, $defaults ); 418 419 if ( count( $items ) > 1 ) -
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 -
trunk/wp-includes/query.php
r14499 r14528 1622 1622 $q['cache_results'] = true; 1623 1623 1624 if ( !isset($q['update_post_term_cache']) ) 1625 $q['update_post_term_cache'] = true; 1626 1627 if ( !isset($q['update_post_meta_cache']) ) 1628 $q['update_post_meta_cache'] = true; 1629 1624 1630 if ( !isset($q['post_type']) ) { 1625 1631 if ( $this->is_search ) … … 2505 2511 2506 2512 if ( $q['cache_results'] ) 2507 update_post_caches($this->posts, $post_type );2513 update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']); 2508 2514 2509 2515 if ( $this->post_count > 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.