Display better information about broken themes when there is no stylesheet. Fixes #10999 props sivel.

git-svn-id: https://develop.svn.wordpress.org/trunk@12091 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-10-22 20:15:54 +00:00
parent 91dafd7a61
commit df21977652
4 changed files with 15 additions and 10 deletions

View File

@ -272,7 +272,7 @@ if ( count($broken_themes) ) {
<h2><?php _e('Broken Themes'); ?></h2>
<p><?php _e('The following themes are installed but incomplete. Themes must have a stylesheet and a template.'); ?></p>
<table width="100%" cellpadding="3" cellspacing="3">
<table id="broken-themes">
<tr>
<th><?php _e('Name'); ?></th>
<th><?php _e('Description'); ?></th>

File diff suppressed because one or more lines are too long

View File

@ -3542,3 +3542,9 @@ input.newtag:focus ~ div.taghint {
visibility: hidden;
}
#broken-themes {
text-align: left;
width: 50%;
border-spacing: 3px;
padding: 3px;
}

View File

@ -544,10 +544,10 @@ function search_theme_directories() {
while ( ($theme_dir = readdir($themes_dir)) !== false ) {
if ( is_dir($theme_root . '/' . $theme_dir) && is_readable($theme_root . '/' . $theme_dir) ) {
if ( $theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS' )
if ( $theme_dir{0} == '.' || $theme_dir == 'CVS' )
continue;
$stylish_dir = @ opendir($theme_root . '/' . $theme_dir);
$stylish_dir = @opendir($theme_root . '/' . $theme_dir);
$found_stylesheet = false;
while ( ($theme_file = readdir($stylish_dir)) !== false ) {
@ -562,14 +562,14 @@ function search_theme_directories() {
if ( !$found_stylesheet ) { // look for themes in that dir
$subdir = "$theme_root/$theme_dir";
$subdir_name = $theme_dir;
$theme_subdir = @ opendir( $subdir );
$theme_subdirs = @opendir( $subdir );
while ( ($theme_dir = readdir($theme_subdir)) !== false ) {
if ( is_dir( $subdir . '/' . $theme_dir) && is_readable($subdir . '/' . $theme_dir) ) {
if ( $theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS' )
while ( ($theme_subdir = readdir($theme_subdirs)) !== false ) {
if ( is_dir( $subdir . '/' . $theme_subdir) && is_readable($subdir . '/' . $theme_subdir) ) {
if ( $theme_subdir{0} == '.' || $theme_subdir == 'CVS' )
continue;
$stylish_dir = @ opendir($subdir . '/' . $theme_dir);
$stylish_dir = @opendir($subdir . '/' . $theme_subdir);
$found_stylesheet = false;
while ( ($theme_file = readdir($stylish_dir)) !== false ) {
@ -583,7 +583,6 @@ function search_theme_directories() {
}
}
@closedir($theme_subdir);
$wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.'));
}
}