In switch_theme(), make sure there are no residual template_root or stylesheet_root options remaining if there is only one theme root registered. see #22252.

git-svn-id: http://core.svn.wordpress.org/trunk@22545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-11-11 21:51:27 +00:00
parent a756c8bfcd
commit 49a0dc9a27

View File

@ -682,6 +682,9 @@ function switch_theme( $stylesheet ) {
if ( count( $wp_theme_directories ) > 1 ) {
update_option( 'template_root', get_raw_theme_root( $template, true ) );
update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, true ) );
} else {
delete_option( 'template_root' );
delete_option( 'stylesheet_root' );
}
$new_name = $new_theme->get('Name');