Theme subdirs that contain themes are not broken if missing a stylesheet. see #10467
git-svn-id: http://svn.automattic.com/wordpress/trunk@12119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fd5848823e
commit
1ada1c60de
@ -565,6 +565,7 @@ function search_theme_directories() {
|
|||||||
$subdir_name = $theme_dir;
|
$subdir_name = $theme_dir;
|
||||||
$theme_subdirs = @opendir( $subdir );
|
$theme_subdirs = @opendir( $subdir );
|
||||||
|
|
||||||
|
$found_subdir_themes = false;
|
||||||
while ( ($theme_subdir = readdir($theme_subdirs)) !== false ) {
|
while ( ($theme_subdir = readdir($theme_subdirs)) !== false ) {
|
||||||
if ( is_dir( $subdir . '/' . $theme_subdir) && is_readable($subdir . '/' . $theme_subdir) ) {
|
if ( is_dir( $subdir . '/' . $theme_subdir) && is_readable($subdir . '/' . $theme_subdir) ) {
|
||||||
if ( $theme_subdir{0} == '.' || $theme_subdir == 'CVS' )
|
if ( $theme_subdir{0} == '.' || $theme_subdir == 'CVS' )
|
||||||
@ -577,6 +578,7 @@ function search_theme_directories() {
|
|||||||
if ( $theme_file == 'style.css' ) {
|
if ( $theme_file == 'style.css' ) {
|
||||||
$theme_files["$theme_dir/$theme_subdir"] = array( 'theme_file' => $subdir_name . '/' . $theme_subdir . '/' . $theme_file, 'theme_root' => $theme_root );
|
$theme_files["$theme_dir/$theme_subdir"] = array( 'theme_file' => $subdir_name . '/' . $theme_subdir . '/' . $theme_file, 'theme_root' => $theme_root );
|
||||||
$found_stylesheet = true;
|
$found_stylesheet = true;
|
||||||
|
$found_subdir_themes = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -584,7 +586,8 @@ function search_theme_directories() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@closedir($theme_subdir);
|
@closedir($theme_subdir);
|
||||||
$wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.'));
|
if ( !$found_subdir_themes )
|
||||||
|
$wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user