From fa133a0fcec09521c27f4f5b5e0683bfb4bf6760 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@4404 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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();