WordPress.org

Make WordPress Core

Changeset 28161


Ignore:
Timestamp:
04/19/14 18:11:24 (4 years ago)
Author:
nacin
Message:

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

fixes #27897.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets.php

    r28124 r28161  
    14221422        $_sidebars_widgets = $old_sidebars_widgets['data']; 
    14231423 
    1424         if ( 'customize' === $theme_changed ) { 
     1424        if ( 'customize' !== $theme_changed ) { 
    14251425            remove_theme_mod( 'sidebars_widgets' ); 
    14261426        } 
     
    15071507 
    15081508    $sidebars_widgets['wp_inactive_widgets'] = array_merge($lost_widgets, (array) $sidebars_widgets['wp_inactive_widgets']); 
    1509     if ( 'customize' === $theme_changed ) { 
     1509    if ( 'customize' !== $theme_changed ) { 
    15101510        wp_set_sidebars_widgets( $sidebars_widgets ); 
    15111511    } 
Note: See TracChangeset for help on using the changeset viewer.