Clear cache of current theme name, if the theme name no longer exists. Fixes failures when an an active theme is renamed in its stylesheet. fixes #12428

git-svn-id: https://develop.svn.wordpress.org/trunk@13762 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-03-19 03:09:02 +00:00
parent 997913449c
commit 13facc3c4c
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@
function current_theme_info() {
$themes = get_themes();
$current_theme = get_current_theme();
if ( ! isset( $themes[$current_theme] ) ) {
delete_option( 'current_theme' );
$current_theme = get_current_theme();
}
$ct->name = $current_theme;
$ct->title = $themes[$current_theme]['Title'];
$ct->version = $themes[$current_theme]['Version'];