Changeset 33808
- Timestamp:
- 08/30/2015 03:00:45 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r33694 r33808 689 689 } 690 690 691 $nav_menu_locations = get_theme_mod( 'nav_menu_locations' ); 692 691 693 $old_theme = wp_get_theme(); 692 694 $new_theme = wp_get_theme( $stylesheet ); … … 717 719 if ( is_admin() && false === get_option( 'theme_mods_' . $stylesheet ) ) { 718 720 $default_theme_mods = (array) get_option( 'mods_' . $new_name ); 721 if ( ! empty( $nav_menu_locations ) && empty( $default_theme_mods['nav_menu_locations'] ) ) { 722 $default_theme_mods['nav_menu_locations'] = $nav_menu_locations; 723 } 719 724 add_option( "theme_mods_$stylesheet", $default_theme_mods ); 720 725 } else { … … 726 731 if ( 'wp_ajax_customize_save' === current_action() ) { 727 732 remove_theme_mod( 'sidebars_widgets' ); 733 } 734 735 if ( ! empty( $nav_menu_locations ) ) { 736 $nav_mods = get_theme_mod( 'nav_menu_locations' ); 737 if ( empty( $nav_mods ) ) { 738 set_theme_mod( 'nav_menu_locations', $nav_menu_locations ); 739 } 728 740 } 729 741 }
Note: See TracChangeset
for help on using the changeset viewer.