Make WordPress Core

Changeset 19249


Ignore:
Timestamp:
11/10/2011 09:06:57 PM (14 years ago)
Author:
ryan
Message:

Properly handle child themes for WP_DEFAULT_THEME. Props SergeyBiryukov. fixes #18591

File:
1 edited

Legend:

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

    r18986 r19249  
    342342    } else {
    343343        $uploads_use_yearmonth_folders = 1;
     344    }
     345
     346    $template = WP_DEFAULT_THEME;
     347    // If default theme is a child theme, we need to get its template
     348    foreach ( (array) get_themes() as $theme ) {
     349        if ( WP_DEFAULT_THEME == $theme['Stylesheet'] ) {
     350            $template = $theme['Template'];
     351            break;
     352        }
    344353    }
    345354
     
    395404    'default_email_category' => 1,
    396405    'recently_edited' => '',
    397     'template' => WP_DEFAULT_THEME,
     406    'template' => $template,
    398407    'stylesheet' => WP_DEFAULT_THEME,
    399408    'comment_whitelist' => 1,
Note: See TracChangeset for help on using the changeset viewer.