mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
79e1854996
commit
3841acea6c
@ -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) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user