Fix logic inversion in [28124] to ensure widgets stay with themes during a theme switch.

fixes #27897.

Built from https://develop.svn.wordpress.org/trunk@28161


git-svn-id: http://core.svn.wordpress.org/trunk@27992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-19 18:12:15 +00:00
parent cd6b973b54
commit f81deab036

View File

@ -1421,7 +1421,7 @@ function retrieve_widgets( $theme_changed = false ) {
// 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' );
}
@ -1506,7 +1506,7 @@ function retrieve_widgets( $theme_changed = false ) {
}
$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 );
}