WordPress.org

Make WordPress Core

Ticket #9392: 9392.patch

File 9392.patch, 2.5 KB (added by Viper007Bond, 9 years ago)
  • wp-admin/includes/theme.php

     
    1414 * @return unknown
    1515 */
    1616function current_theme_info() {
    17         $themes = get_themes();
    18         $current_theme = get_current_theme();
    19         $ct->name = $current_theme;
    20         $ct->title = $themes[$current_theme]['Title'];
    21         $ct->version = $themes[$current_theme]['Version'];
    22         $ct->parent_theme = $themes[$current_theme]['Parent Theme'];
    23         $ct->template_dir = $themes[$current_theme]['Template Dir'];
    24         $ct->stylesheet_dir = $themes[$current_theme]['Stylesheet Dir'];
    25         $ct->template = $themes[$current_theme]['Template'];
    26         $ct->stylesheet = $themes[$current_theme]['Stylesheet'];
    27         $ct->screenshot = $themes[$current_theme]['Screenshot'];
    28         $ct->description = $themes[$current_theme]['Description'];
    29         $ct->author = $themes[$current_theme]['Author'];
    30         $ct->tags = $themes[$current_theme]['Tags'];
     17        $themes             = get_themes();
     18        $current_theme      = get_current_theme();
     19        $ct->name           = $current_theme;
     20        $ct->title          = ( isset($themes[$current_theme]['Title']) )          ? $themes[$current_theme]['Title']          : '';
     21        $ct->version        = ( isset($themes[$current_theme]['Version']) )        ? $themes[$current_theme]['Version']        : '';
     22        $ct->parent_theme   = ( isset($themes[$current_theme]['Parent Theme']) )   ? $themes[$current_theme]['Parent Theme']   : '';
     23        $ct->template_dir   = ( isset($themes[$current_theme]['Template Dir']) )   ? $themes[$current_theme]['Template Dir']   : '';
     24        $ct->stylesheet_dir = ( isset($themes[$current_theme]['Stylesheet Dir']) ) ? $themes[$current_theme]['Stylesheet Dir'] : '';
     25        $ct->template       = ( isset($themes[$current_theme]['Template']) )       ? $themes[$current_theme]['Template']       : '';
     26        $ct->stylesheet     = ( isset($themes[$current_theme]['Stylesheet']) )     ? $themes[$current_theme]['Stylesheet']     : '';
     27        $ct->screenshot     = ( isset($themes[$current_theme]['Screenshot']) )     ? $themes[$current_theme]['Screenshot']     : '';
     28        $ct->description    = ( isset($themes[$current_theme]['Description']) )    ? $themes[$current_theme]['Description']    : '';
     29        $ct->author         = ( isset($themes[$current_theme]['Author']) )         ? $themes[$current_theme]['Author']         : '';
     30        $ct->tags           = ( isset($themes[$current_theme]['Tags']) )           ? $themes[$current_theme]['Tags']           : '';
    3131        return $ct;
    3232}
    3333