Customizer: Avoid PHP notices after [32806].
props adamsilverstein, westonruter. fixes #32781. Built from https://develop.svn.wordpress.org/trunk@33035 git-svn-id: http://core.svn.wordpress.org/trunk@33006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
04793dce34
commit
52db28396c
|
@ -753,17 +753,17 @@ final class WP_Customize_Nav_Menus {
|
||||||
$args['instance_number'] = $this->preview_nav_menu_instance_number;
|
$args['instance_number'] = $this->preview_nav_menu_instance_number;
|
||||||
|
|
||||||
$can_partial_refresh = (
|
$can_partial_refresh = (
|
||||||
$args['echo']
|
! empty( $args['echo'] )
|
||||||
&&
|
&&
|
||||||
is_string( $args['fallback_cb'] )
|
( empty( $args['fallback_cb'] ) || is_string( $args['fallback_cb'] ) )
|
||||||
&&
|
&&
|
||||||
is_string( $args['walker'] )
|
( empty( $args['walker'] ) || is_string( $args['walker'] ) )
|
||||||
);
|
);
|
||||||
$args['can_partial_refresh'] = $can_partial_refresh;
|
$args['can_partial_refresh'] = $can_partial_refresh;
|
||||||
|
|
||||||
if ( ! $can_partial_refresh ) {
|
if ( ! $can_partial_refresh ) {
|
||||||
unset( $args['fallback_cb'] );
|
$args['fallback_cb'] = '';
|
||||||
unset( $args['walker'] );
|
$args['walker'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
ksort( $args );
|
ksort( $args );
|
||||||
|
|
|
@ -308,7 +308,7 @@ function wp_nav_menu( $args = array() ) {
|
||||||
* - Otherwise, bail.
|
* - Otherwise, bail.
|
||||||
*/
|
*/
|
||||||
if ( ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) && !$args->theme_location ) )
|
if ( ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) && !$args->theme_location ) )
|
||||||
&& $args->fallback_cb && is_callable( $args->fallback_cb ) )
|
&& isset( $args->fallback_cb ) && $args->fallback_cb && is_callable( $args->fallback_cb ) )
|
||||||
return call_user_func( $args->fallback_cb, (array) $args );
|
return call_user_func( $args->fallback_cb, (array) $args );
|
||||||
|
|
||||||
if ( ! $menu || is_wp_error( $menu ) )
|
if ( ! $menu || is_wp_error( $menu ) )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.3-alpha-33034';
|
$wp_version = '4.3-alpha-33035';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue