Make WordPress Core


Ignore:
Timestamp:
10/24/2004 11:48:51 PM (22 years ago)
Author:
rboren
Message:

List broken themes and suggest corrective action.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r1818 r1829  
    100100}
    101101?>
     102
     103<?php
     104// List broken themes, if any.
     105$broken_themes = get_broken_themes();
     106if (count($broken_themes)) {
     107?>
     108
     109<h2><?php _e('Broken Themes'); ?></h2>
     110<p><?php _e('The following themes are installed but incomplete.  Themes must have a stylesheet and a template.'); ?></p>
     111
     112<table width="100%" cellpadding="3" cellspacing="3">
     113        <tr>
     114                <th><?php _e('Name'); ?></th>
     115                <th><?php _e('Description'); ?></th>
     116        </tr>
     117<?php
     118        $theme = '';
     119       
     120        $theme_names = array_keys($broken_themes);
     121        natcasesort($theme_names);
     122
     123        foreach ($theme_names as $theme_name) {
     124                $title = $broken_themes[$theme_name]['Title'];
     125                $description = $broken_themes[$theme_name]['Description'];
     126
     127                $theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"';
     128                echo "
     129          <tr $theme>
     130             <td>$title</td>
     131             <td>$description</td>
     132          </tr>";
     133        }
     134?>
     135</table>
     136<?php
     137}
     138?>
     139
    102140</div>
    103141
Note: See TracChangeset for help on using the changeset viewer.