- Timestamp:
- 03/08/2012 07:32:42 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r20147 r20151 17 17 18 18 $status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all'; 19 if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search' ) ) )19 if ( !in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken' ) ) ) 20 20 $status = 'all'; 21 21 … … 60 60 'enabled' => array(), 61 61 'disabled' => array(), 62 'upgrade' => array() 62 'upgrade' => array(), 63 'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ), 63 64 ); 64 65 … … 71 72 } 72 73 73 $ current= current_user_can( 'update_themes' ) && ! $this->is_site_themes && get_site_transient( 'update_themes' );74 $maybe_update = current_user_can( 'update_themes' ) && ! $this->is_site_themes && get_site_transient( 'update_themes' ); 74 75 75 76 foreach ( (array) $themes['all'] as $key => $theme ) { … … 82 83 $themes[ $filter ][ $key ] = $themes['all'][ $key ]; 83 84 84 if ( $ current&& isset( $current->response[ $key ] ) )85 if ( $maybe_update && isset( $current->response[ $key ] ) ) 85 86 $themes['upgrade'][ $key ] = $themes['all'][ $key ]; 86 87 } … … 206 207 case 'upgrade': 207 208 $text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count ); 209 break; 210 case 'broken' : 211 $text = _n( 'Broken <span class="count">(%s)</span>', 'Broken <span class="count">(%s)</span>', $count ); 208 212 break; 209 213 } … … 298 302 $checkbox = "<input type='checkbox' name='checked[]' value='" . esc_attr( $theme_key ) . "' id='" . $checkbox_id . "' /><label class='screen-reader-text' for='" . $checkbox_id . "' >" . __('Select') . " " . $theme->display('Name') . "</label>"; 299 303 300 $description = '<p>' . $theme->display( 'Description' ) . '</p>';301 302 304 $id = sanitize_html_class( $theme->get_stylesheet() ); 303 305 … … 321 323 break; 322 324 case 'description': 323 echo "<td class='column-description desc'$style> 324 <div class='theme-description'>" . $theme->display( 'Description' ) . "</div> 325 echo "<td class='column-description desc'$style>"; 326 if ( $theme->errors() ) 327 echo '<p><strong>' . $theme->errors()->get_error_message() . '</strong></p>'; 328 echo "<div class='theme-description'><p>" . $theme->display( 'Description' ) . "</p></div> 325 329 <div class='$class second theme-version-author-uri'>"; 326 330
Note: See TracChangeset
for help on using the changeset viewer.