Make WordPress Core


Ignore:
Timestamp:
05/10/2010 12:58:39 AM (14 years ago)
Author:
ryan
Message:

Allow turning off object_term and postmeta cache updates. Turn off object_term updates in the wp_get_nav_menu_items() get_posts() query to avoid useless taxonomy query.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu.php

    r14450 r14528  
    414414
    415415    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);
    417418        $args = wp_parse_args( $args, $defaults );
    418419        if ( count( $items ) > 1 )
Note: See TracChangeset for help on using the changeset viewer.