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
This commit is contained in:
parent
e4896b513a
commit
db4a834c82
@ -183,9 +183,14 @@ function get_themes() {
|
|||||||
$template = trim($template);
|
$template = trim($template);
|
||||||
|
|
||||||
if ( !file_exists("$theme_root/$template/index.php") ) {
|
if ( !file_exists("$theme_root/$template/index.php") ) {
|
||||||
|
$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.'));
|
$wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$stylesheet_files = array();
|
$stylesheet_files = array();
|
||||||
$stylesheet_dir = @ dir("$theme_root/$stylesheet");
|
$stylesheet_dir = @ dir("$theme_root/$stylesheet");
|
||||||
|
Loading…
Reference in New Issue
Block a user