WordPress.org

Make WordPress Core

Changeset 14297


Ignore:
Timestamp:
04/29/10 14:58:22 (5 years ago)
Author:
ryan
Message:

Set nopaging for the wp_get_nav_menu_items() get_posts() call to avoid pointless found rows queries. see #13134

File:
1 edited

Legend:

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

    r14295 r14297  
    409409 
    410410    if ( ! empty( $items ) ) { 
    411         $defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order' ); 
     411        $defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true ); 
    412412        $args = wp_parse_args( $args, $defaults ); 
    413413        if ( count( $items ) > 1 ) 
Note: See TracChangeset for help on using the changeset viewer.