WordPress.org

Make WordPress Core

Ticket #13656: nav-menu-template.php.diff

File nav-menu-template.php.diff, 1.0 KB (added by nathanrice, 8 years ago)
  • wp-includes/nav-menu-template.php

     
    209209        global $_wp_nav_menu_slugs;
    210210        $defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu',
    211211        'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '',
    212         'depth' => 0, 'walker' => '', 'context' => 'frontend', 'theme_location' => '' );
     212        'depth' => 0, 'walker' => '', 'context' => array( 'frontend' ), 'theme_location' => '' );
    213213
    214214        $args = wp_parse_args( $args, $defaults );
    215215        $args = apply_filters( 'wp_nav_menu_args', $args );
     
    258258        }
    259259
    260260        // Set up the $menu_item variables
    261         if ( 'frontend' == $args->context )
     261        if ( in_array( 'frontend', (array)$args->context ) )
    262262                _wp_menu_item_classes_by_context( $menu_items );
    263263
    264264        $sorted_menu_items = array();