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: http://svn.automattic.com/wordpress/trunk@13762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8704bbf226
commit
8b7d7afa72
|
@ -16,6 +16,10 @@
|
||||||
function current_theme_info() {
|
function current_theme_info() {
|
||||||
$themes = get_themes();
|
$themes = get_themes();
|
||||||
$current_theme = get_current_theme();
|
$current_theme = get_current_theme();
|
||||||
|
if ( ! isset( $themes[$current_theme] ) ) {
|
||||||
|
delete_option( 'current_theme' );
|
||||||
|
$current_theme = get_current_theme();
|
||||||
|
}
|
||||||
$ct->name = $current_theme;
|
$ct->name = $current_theme;
|
||||||
$ct->title = $themes[$current_theme]['Title'];
|
$ct->title = $themes[$current_theme]['Title'];
|
||||||
$ct->version = $themes[$current_theme]['Version'];
|
$ct->version = $themes[$current_theme]['Version'];
|
||||||
|
|
Loading…
Reference in New Issue