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

git-svn-id: http://svn.automattic.com/wordpress/trunk@14297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-04-29 14:58:22 +00:00
parent 8dbbe467dc
commit ce7b2b4f58

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 );