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:
parent
7216663b0b
commit
0c23ef3cf0
|
@ -682,6 +682,9 @@ function switch_theme( $stylesheet ) {
|
||||||
if ( count( $wp_theme_directories ) > 1 ) {
|
if ( count( $wp_theme_directories ) > 1 ) {
|
||||||
update_option( 'template_root', get_raw_theme_root( $template, true ) );
|
update_option( 'template_root', get_raw_theme_root( $template, true ) );
|
||||||
update_option( 'stylesheet_root', get_raw_theme_root( $stylesheet, 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');
|
$new_name = $new_theme->get('Name');
|
||||||
|
|
Loading…
Reference in New Issue