Make WordPress Core

Changeset 13762


Ignore:
Timestamp:
03/19/2010 03:09:02 AM (15 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme.php

    r13242 r13762  
    1717    $themes = get_themes();
    1818    $current_theme = get_current_theme();
     19    if ( ! isset( $themes[$current_theme] ) ) {
     20        delete_option( 'current_theme' );
     21        $current_theme = get_current_theme();
     22    }
    1923    $ct->name = $current_theme;
    2024    $ct->title = $themes[$current_theme]['Title'];
Note: See TracChangeset for help on using the changeset viewer.