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

git-svn-id: http://svn.automattic.com/wordpress/trunk@14793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-05-21 20:28:11 +00:00
parent 79e1854996
commit 3841acea6c
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) ) {