Changeset 20029 for trunk/wp-admin/themes.php
- Timestamp:
- 02/28/2012 09:24:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/themes.php
r19941 r20029 97 97 <?php endif; ?> 98 98 </h2> 99 100 <h3><?php _e( 'Current Theme'); ?></h3>99 <?php $ct = wp_get_theme(); ?> 100 <h3><?php _e( 'Current Theme' ); ?></h3> 101 101 <div id="current-theme"> 102 <?php if ( $ct-> screenshot) : ?>103 <img src="<?php echo $ct-> theme_root_uri . '/' . $ct->stylesheet . '/' . $ct->screenshot; ?>" alt="<?php esc_attr_e('Current theme preview'); ?>" />102 <?php if ( $ct->get_screenshot() ) : ?> 103 <img src="<?php echo $ct->get_screenshot( 'absolute' ); ?>" alt="<?php esc_attr_e( 'Current theme preview'); ?>" /> 104 104 <?php endif; ?> 105 105 <h4><?php 106 106 /* translators: 1: theme title, 2: theme version, 3: theme author */ 107 printf( __('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h4>108 <p class="theme-description"><?php echo $ct->d escription; ?></p>107 printf( __( '%1$s %2$s by %3$s' ), $ct->display('Name'), $ct->display('Version'), $ct->display('Author') ) ; ?></h4> 108 <p class="theme-description"><?php echo $ct->display('Description'); ?></p> 109 109 <div class="theme-options"> 110 110 <span><?php _e( 'Options:' )?></span> … … 118 118 continue; 119 119 // 0 = name, 1 = capability, 2 = file 120 if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) ) $class = ' class="current"';121 120 if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) ) 121 $class = ' class="current"'; 122 122 if ( !empty($submenu[$item[2]]) ) { 123 123 $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. … … 138 138 echo implode ( ' | ', $options ); 139 139 140 if ( $ct-> tags) : ?>141 <p><?php _e('Tags:'); ?> <?php echo join(', ', $ct->tags); ?></p>140 if ( $ct->get('Tags') ) : ?> 141 <p><?php _e('Tags:'); ?> <?php echo $ct->display('Tags'); ?></p> 142 142 <?php endif; ?> 143 143 </div> … … 219 219 <?php 220 220 // List broken themes, if any. 221 $broken_themes = get_broken_themes(); 222 if ( current_user_can('edit_themes') && count( $broken_themes ) ) { 221 if ( current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) { 223 222 ?> 224 223 … … 232 231 </tr> 233 232 <?php 234 $theme = ''; 235 236 $theme_names = array_keys($broken_themes); 237 natcasesort($theme_names); 238 239 foreach ($theme_names as $theme_name) { 240 $name = $broken_themes[$theme_name]['Title']; 241 $description = $broken_themes[$theme_name]['Description']; 242 243 $theme = ('class="alternate"' == $theme) ? '' : 'class="alternate"'; 233 $alt = ''; 234 foreach ( $broken_themes as $broken_theme ) { 235 $alt = ('class="alternate"' == $alt) ? '' : 'class="alternate"'; 244 236 echo " 245 <tr $ theme>246 <td> $name</td>247 <td> $description</td>237 <tr $alt> 238 <td>" . $broken_theme->get('Name') ."</td> 239 <td>" . $broken_theme->errors()->get_error_message() . "</td> 248 240 </tr>"; 249 241 }
Note: See TracChangeset
for help on using the changeset viewer.