Make WordPress Core


Ignore:
Timestamp:
09/08/2011 07:25:20 PM (12 years ago)
Author:
azaozz
Message:

Use theme mods instead of transients for storing the previous theme's widgets config, props aaroncampbell, see #17979

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r18639 r18654  
    12471247 */
    12481248function switch_theme($template, $stylesheet) {
    1249     global $wp_theme_directories;
     1249    global $wp_theme_directories, $sidebars_widgets;
     1250
     1251    if ( ! is_array( $sidebars_widgets ) )
     1252        $sidebars_widgets = wp_get_sidebars_widgets();
     1253    set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) );
    12501254
    12511255    $old_theme = get_current_theme();
Note: See TracChangeset for help on using the changeset viewer.