Add theme_mods option if is_admin. props MarkJaquith, fixes #14828.
git-svn-id: https://develop.svn.wordpress.org/trunk@16958 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
700374e0b0
commit
a653754287
|
@ -1256,6 +1256,10 @@ function switch_theme($template, $stylesheet) {
|
|||
}
|
||||
delete_option('current_theme');
|
||||
$theme = get_current_theme();
|
||||
if ( is_admin() && false === get_option( "theme_mods_$stylesheet" ) ) {
|
||||
$default_theme_mods = (array) get_option( "mods_$theme" );
|
||||
add_option( "theme_mods_$stylesheet", $default_theme_mods );
|
||||
}
|
||||
do_action('switch_theme', $theme);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue