From ba9bd2e2086b4835c2729ef037db576cbdb2edfd Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 10 Nov 2011 21:06:57 +0000 Subject: [PATCH] Properly handle child themes for WP_DEFAULT_THEME. Props SergeyBiryukov. fixes #18591 git-svn-id: http://svn.automattic.com/wordpress/trunk@19249 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/schema.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 8ab2e8bdcb..08cb20bc35 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -343,6 +343,15 @@ function populate_options() { $uploads_use_yearmonth_folders = 1; } + $template = WP_DEFAULT_THEME; + // If default theme is a child theme, we need to get its template + foreach ( (array) get_themes() as $theme ) { + if ( WP_DEFAULT_THEME == $theme['Stylesheet'] ) { + $template = $theme['Template']; + break; + } + } + $options = array( 'siteurl' => $guessurl, 'blogname' => __('My Site'), @@ -394,7 +403,7 @@ function populate_options() { // 1.5 'default_email_category' => 1, 'recently_edited' => '', - 'template' => WP_DEFAULT_THEME, + 'template' => $template, 'stylesheet' => WP_DEFAULT_THEME, 'comment_whitelist' => 1, 'blacklist_keys' => '',