From db4a834c82ee6180a78ce4d1bda880411f76a60e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 18 Oct 2006 20:24:59 +0000 Subject: [PATCH] Fix handling of stylesheet only themes that live two-levels deep. git-svn-id: https://develop.svn.wordpress.org/trunk@4404 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 1662d460e4..1bd6775336 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -183,8 +183,13 @@ function get_themes() { $template = trim($template); if ( !file_exists("$theme_root/$template/index.php") ) { - $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); - continue; + $parent_dir = dirname(dirname($theme_file)); + if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) { + $template = "$parent_dir/$template"; + } else { + $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); + continue; + } } $stylesheet_files = array();