[wp-cvs] wordpress/wp-admin admin-functions.php, 1.52,
1.53 themes.php, 1.6, 1.7
Ryan Boren
rboren at users.sourceforge.net
Sun Oct 24 23:48:53 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31850/wp-admin
Modified Files:
admin-functions.php themes.php
Log Message:
List broken themes and suggest corrective action.
Index: admin-functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/admin-functions.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** admin-functions.php 19 Oct 2004 03:03:03 -0000 1.52
--- admin-functions.php 24 Oct 2004 23:48:51 -0000 1.53
***************
*** 573,576 ****
--- 573,583 ----
}
+ function get_broken_themes() {
+ global $wp_broken_themes;
+
+ get_themes();
+ return $wp_broken_themes;
+ }
+
function get_page_templates() {
$themes = get_themes();
Index: themes.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/themes.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** themes.php 19 Oct 2004 03:03:06 -0000 1.6
--- themes.php 24 Oct 2004 23:48:51 -0000 1.7
***************
*** 100,103 ****
--- 100,141 ----
}
?>
+
+ <?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>
More information about the cvs
mailing list