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: https://develop.svn.wordpress.org/trunk@22545 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-11-11 21:51:27 +00:00
parent 7216663b0b
commit 0c23ef3cf0
1 changed files with 3 additions and 0 deletions

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');