mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
List broken themes and suggest corrective action.
git-svn-id: https://develop.svn.wordpress.org/trunk@1829 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -572,6 +572,13 @@ function validate_current_theme() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function get_broken_themes() {
|
||||
global $wp_broken_themes;
|
||||
|
||||
get_themes();
|
||||
return $wp_broken_themes;
|
||||
}
|
||||
|
||||
function get_page_templates() {
|
||||
$themes = get_themes();
|
||||
$theme = get_current_theme();
|
||||
|
||||
@@ -99,6 +99,44 @@ $current_stylesheet = $themes[$current_theme]['Stylesheet'];
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// List broken themes, if any.
|
||||
$broken_themes = get_broken_themes();
|
||||
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">
|
||||
<tr>
|
||||
<th><?php _e('Name'); ?></th>
|
||||
<th><?php _e('Description'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$theme = '';
|
||||
|
||||
$theme_names = array_keys($broken_themes);
|
||||
natcasesort($theme_names);
|
||||
|
||||
foreach ($theme_names as $theme_name) {
|
||||
$title = $broken_themes[$theme_name]['Title'];
|
||||
$description = $broken_themes[$theme_name]['Description'];
|
||||
|
||||
$theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"';
|
||||
echo "
|
||||
<tr $theme>
|
||||
<td>$title</td>
|
||||
<td>$description</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user