WordPress.org

Make WordPress Core

Changeset 28162


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

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

Merges [28161] to the 3.9 branch.

props gcorne.
fixes #27897.

Location:
branches/3.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.9

  • branches/3.9/src/wp-includes/widgets.php

    r28124 r28162  
    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.