mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
a756c8bfcd
commit
49a0dc9a27
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user