diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 89eab5f790..6909d0fe2e 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -690,7 +690,7 @@ function switch_theme( $stylesheet ) { } if ( is_array( $_sidebars_widgets ) ) { - set_theme_mod( 'sidebars_widgets', $_sidebars_widgets ); + set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $_sidebars_widgets ) ); } $nav_menu_locations = get_theme_mod( 'nav_menu_locations' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index a23abcd8a8..47064c35d3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41672'; +$wp_version = '4.9-alpha-41673'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 37e8a01c52..6f5954d322 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -1286,6 +1286,7 @@ function wp_map_sidebars_widgets( $existing_sidebars_widgets ) { // Sidebars_widgets settings from when this theme was previously active. $old_sidebars_widgets = get_theme_mod( 'sidebars_widgets' ); + $old_sidebars_widgets = $old_sidebars_widgets['data']; if ( is_array( $old_sidebars_widgets ) ) {