mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Bail when there is neither a menu, or a fallback. props ptahdunbar, fixes #13006.
git-svn-id: https://develop.svn.wordpress.org/trunk@14415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eee631b773
commit
f01af5fefd
@ -220,6 +220,10 @@ function wp_nav_menu( $args = array() ) {
|
||||
}
|
||||
}
|
||||
|
||||
// If no fallback function was specified and the menu doesn't exists, bail.
|
||||
if ( !$menu || is_wp_error($menu) )
|
||||
return false;
|
||||
|
||||
$nav_menu = '';
|
||||
$items = '';
|
||||
$container_allowedtags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'p', 'nav' ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user