diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 0b87b7c744..84360a4625 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -88,7 +88,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table { if ( $s ) { $status = 'search'; - $themes['search'] = array_filter( $themes['all'], array( &$this, '_search_callback' ) ); + $themes['search'] = array_filter( array_merge( $themes['all'], $themes['broken'] ), array( &$this, '_search_callback' ) ); } $totals = array(); @@ -283,10 +283,12 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $theme_key = $theme->get_stylesheet(); - if ( ! $allowed ) - $actions['enable'] = '' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . ''; - else + if ( ! $allowed ) { + if ( ! $theme->errors() ) + $actions['enable'] = '' . ( $this->is_site_themes ? __( 'Enable' ) : __( 'Network Enable' ) ) . ''; + } else { $actions['disable'] = '' . ( $this->is_site_themes ? __( 'Disable' ) : __( 'Network Disable' ) ) . ''; + } if ( current_user_can('edit_themes') ) $actions['edit'] = '' . __('Edit') . ''; @@ -323,8 +325,10 @@ class WP_MS_Themes_List_Table extends WP_List_Table { break; case 'description': echo "
' . $theme->errors()->get_error_message() . '
'; + if ( $theme->errors() ) { + $pre = $status == 'broken' ? '' : __( 'Broken Theme:' ) . ' '; + echo '' . $pre . $theme->errors()->get_error_message() . '
'; + } echo "" . $theme->display( 'Description' ) . "