Changeset 41995
- Timestamp:
- 10/24/2017 06:34:21 PM (7 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r41956 r41995 530 530 */ 531 531 public function customize_register() { 532 $changeset = $this->manager->unsanitized_post_values(); 532 533 533 534 // Preview settings for nav menus early so that the sections and controls will be added properly. 534 535 $nav_menus_setting_ids = array(); 535 foreach ( array_keys( $ this->manager->unsanitized_post_values()) as $setting_id ) {536 foreach ( array_keys( $changeset ) as $setting_id ) { 536 537 if ( preg_match( '/^(nav_menu_locations|nav_menu|nav_menu_item)\[/', $setting_id ) ) { 537 538 $nav_menus_setting_ids[] = $setting_id; … … 628 629 629 630 // Override the assigned nav menu location if mapped during previewed theme switch. 630 if ( isset( $mapped_nav_menu_locations[ $location ] ) ) {631 if ( empty( $changeset[ $setting_id ] ) && isset( $mapped_nav_menu_locations[ $location ] ) ) { 631 632 $this->manager->set_post_value( $setting_id, $mapped_nav_menu_locations[ $location ] ); 632 633 } -
trunk/src/wp-includes/theme.php
r41937 r41995 695 695 696 696 $nav_menu_locations = get_theme_mod( 'nav_menu_locations' ); 697 add_option( 'theme_switch_menu_locations', $nav_menu_locations );697 update_option( 'theme_switch_menu_locations', $nav_menu_locations ); 698 698 699 699 if ( func_num_args() > 1 ) { … … 2725 2725 $old_theme = wp_get_theme( $stylesheet ); 2726 2726 2727 // Prevent retrieve_widgets()from running since Customizer already called it up front2727 // Prevent widget & menu mapping from running since Customizer already called it up front 2728 2728 if ( get_option( 'theme_switched_via_customizer' ) ) { 2729 remove_action( 'after_switch_theme', '_wp_menus_changed' ); 2729 2730 remove_action( 'after_switch_theme', '_wp_sidebars_changed' ); 2730 2731 update_option( 'theme_switched_via_customizer', false );
Note: See TracChangeset
for help on using the changeset viewer.