mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Use theme mods instead of transients for storing the previous theme's widgets config, props aaroncampbell, see #17979
git-svn-id: https://develop.svn.wordpress.org/trunk@18654 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1246,7 +1246,11 @@ function preview_theme_ob_filter_callback( $matches ) {
|
||||
* @param string $stylesheet Stylesheet name.
|
||||
*/
|
||||
function switch_theme($template, $stylesheet) {
|
||||
global $wp_theme_directories;
|
||||
global $wp_theme_directories, $sidebars_widgets;
|
||||
|
||||
if ( ! is_array( $sidebars_widgets ) )
|
||||
$sidebars_widgets = wp_get_sidebars_widgets();
|
||||
set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) );
|
||||
|
||||
$old_theme = get_current_theme();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user