Make WordPress Core

Changeset 28825


Ignore:
Timestamp:
06/24/2014 05:16:02 PM (10 years ago)
Author:
wonderboymusic
Message:

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

Props UmeshSingla.
Fixes #28515.

File:
1 edited

Legend:

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

    r28242 r28825  
    548548        'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order', 'nopaging' => true );
    549549    $args = wp_parse_args( $args, $defaults );
    550     if ( count( $items ) > 1 )
    551         $args['include'] = implode( ',', $items );
    552     else
    553         $args['include'] = $items[0];
     550    $args['include'] = $items;
    554551
    555552    $items = get_posts( $args );
Note: See TracChangeset for help on using the changeset viewer.