Customizer: Restore default fallback_cb
arg for wp_nav_menu()
calls in customizer preview.
Props ocean90, westonruter. Fixes #33218. git-svn-id: https://develop.svn.wordpress.org/trunk@33585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3d88983860
commit
fb62349c77
@ -230,11 +230,6 @@ function wp_nav_menu( $args = array() ) {
|
|||||||
'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
|
'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
|
||||||
'depth' => 0, 'walker' => '', 'theme_location' => '' );
|
'depth' => 0, 'walker' => '', 'theme_location' => '' );
|
||||||
|
|
||||||
// Prevent a fallback_cb in Customizer Preview to assist with has_nav_menu() and partial refresh.
|
|
||||||
if ( is_customize_preview() ) {
|
|
||||||
$defaults['fallback_cb'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$args = wp_parse_args( $args, $defaults );
|
$args = wp_parse_args( $args, $defaults );
|
||||||
/**
|
/**
|
||||||
* Filter the arguments used to display a navigation menu.
|
* Filter the arguments used to display a navigation menu.
|
||||||
|
Loading…
Reference in New Issue
Block a user