// time() that sidebars were stored is in $old_sidebars_widgets['time']
$_sidebars_widgets = $old_sidebars_widgets['data'];
- if ( 'customize' === $theme_changed ) {
+ if ( 'customize' !== $theme_changed ) {
remove_theme_mod( 'sidebars_widgets' );
}
}
$sidebars_widgets['wp_inactive_widgets'] = array_merge($lost_widgets, (array) $sidebars_widgets['wp_inactive_widgets']);
- if ( 'customize' === $theme_changed ) {
+ if ( 'customize' !== $theme_changed ) {
wp_set_sidebars_widgets( $sidebars_widgets );
}