Simplify the setting of `$args['include']` in `wp_get_nav_menu_items()`.

Props UmeshSingla.
Fixes #28515.

Built from https://develop.svn.wordpress.org/trunk@28825


git-svn-id: http://core.svn.wordpress.org/trunk@28629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-06-24 17:17:14 +00:00
parent 0ba605c55c
commit 7b83df547d
1 changed files with 1 additions and 4 deletions

View File

@ -547,10 +547,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) {
$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 );
else
$args['include'] = $items[0];
$args['include'] = $items;
$items = get_posts( $args );