Don't look for a fallback menu when a specific location is requested. Props tinkerpriest. see #13378

git-svn-id: https://develop.svn.wordpress.org/trunk@14793 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-05-21 20:28:11 +00:00
parent 13bd107367
commit 6d183a8505
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ function wp_nav_menu( $args = array() ) {
$menu = wp_get_nav_menu_object( $locations[ $args->theme_location ] );
// get the first menu that has items if we still can't find a menu
if ( ! $menu ) {
if ( ! $menu && !$args->theme_location ) {
$menus = wp_get_nav_menus();
foreach ( $menus as $menu_maybe ) {
if ( $menu_items = wp_get_nav_menu_items($menu_maybe->term_id) ) {