Make WordPress Core

Ticket #12428: 12428.diff

File 12428.diff, 528 bytes (added by nacin, 15 years ago)

Clears cached name of the current theme if there is no corresponding theme.

  • theme.php

     
    1616function current_theme_info() {
    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'];
    2125        $ct->version = $themes[$current_theme]['Version'];