Changeset 20151
- Timestamp:
- 03/08/2012 07:32:42 AM (11 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 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 -
trunk/wp-admin/network/themes.php
r20037 r20151 41 41 $allowed_themes[ $_GET['theme'] ] = true; 42 42 update_site_option( 'allowedthemes', $allowed_themes ); 43 wp_ redirect( network_admin_url( 'themes.php?enabled=1') );43 wp_safe_redirect( add_query_arg( 'enabled', 1, $referer ) ); 44 44 exit; 45 45 break; … … 245 245 </form> 246 246 247 <?php $wp_list_table->views(); ?> 247 <?php 248 $wp_list_table->views(); 249 250 if ( 'broken' == $status ) 251 echo '<p class="clear">' . __('The following themes are installed but incomplete. Themes must have a stylesheet and a template.') . '</p>'; 252 ?> 248 253 249 254 <form method="post" action=""> -
trunk/wp-admin/themes.php
r20069 r20151 215 215 <?php 216 216 // List broken themes, if any. 217 if ( current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {217 if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) { 218 218 ?> 219 219
Note: See TracChangeset
for help on using the changeset viewer.