mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00: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: https://develop.svn.wordpress.org/trunk@22545 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user