diff --git src/wp-includes/class-wp-customize-nav-menus.php src/wp-includes/class-wp-customize-nav-menus.php
index e263e3f391..64fec2e814 100644
|
|
final class WP_Customize_Nav_Menus { |
1132 | 1132 | add_action( 'wp_enqueue_scripts', array( $this, 'customize_preview_enqueue_deps' ) ); |
1133 | 1133 | add_filter( 'wp_nav_menu_args', array( $this, 'filter_wp_nav_menu_args' ), 1000 ); |
1134 | 1134 | add_filter( 'wp_nav_menu', array( $this, 'filter_wp_nav_menu' ), 10, 2 ); |
| 1135 | add_filter( 'wp_page_menu', array( $this, 'filter_wp_nav_menu' ), 10, 2 ); |
1135 | 1136 | add_filter( 'wp_footer', array( $this, 'export_preview_data' ), 1 ); |
1136 | 1137 | add_filter( 'customize_render_partials_response', array( $this, 'export_partial_rendered_nav_menu_instances' ) ); |
1137 | 1138 | } |
… |
… |
final class WP_Customize_Nav_Menus { |
1294 | 1295 | * @return null |
1295 | 1296 | */ |
1296 | 1297 | public function filter_wp_nav_menu( $nav_menu_content, $args ) { |
| 1298 | $args = (object) $args; |
1297 | 1299 | if ( isset( $args->customize_preview_nav_menus_args['can_partial_refresh'] ) && $args->customize_preview_nav_menus_args['can_partial_refresh'] ) { |
1298 | 1300 | $attributes = sprintf( ' data-customize-partial-id="%s"', esc_attr( 'nav_menu_instance[' . $args->customize_preview_nav_menus_args['args_hmac'] . ']' ) ); |
1299 | 1301 | $attributes .= ' data-customize-partial-type="nav_menu_instance"'; |
diff --git src/wp-includes/js/customize-preview-nav-menus.js src/wp-includes/js/customize-preview-nav-menus.js
index 6745b41be8..ac2bfcde5c 100644
|
|
wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( |
212 | 212 | } else if ( partial.params.navMenuArgs.theme_location && api.has( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ) ) { |
213 | 213 | menuId = api( 'nav_menu_locations[' + partial.params.navMenuArgs.theme_location + ']' ).get(); |
214 | 214 | } |
215 | | if ( ! menuId ) { |
| 215 | if ( ! menuId && ! partial.params.navMenuArgs.fallback_cb ) { |
216 | 216 | partial.fallback(); |
217 | 217 | deferred.reject(); |
218 | 218 | return deferred.promise(); |