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
This commit is contained in:
ryan 2006-10-18 20:24:59 +00:00
parent 5aeac330dc
commit fa133a0fce

View File

@ -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();