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

git-svn-id: https://develop.svn.wordpress.org/trunk@14297 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-04-29 14:58:22 +00:00
parent 9b70c151dd
commit 61a22bca5d
1 changed files with 1 additions and 1 deletions

View File

@ -408,7 +408,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
$items = get_objects_in_term( $menu->term_id, 'nav_menu' );
if ( ! empty( $items ) ) {
$defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order' );
$defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true );
$args = wp_parse_args( $args, $defaults );
if ( count( $items ) > 1 )
$args['include'] = implode( ',', $items );