@@ -118,6 +118,7 @@ public function prepare_items() {
118118 'disabled ' => array (),
119119 'upgrade ' => array (),
120120 'broken ' => $ this ->is_site_themes ? array () : wp_get_themes ( array ( 'errors ' => true ) ),
121+ 'default ' => array ( wp_get_theme ( WP_Theme::network_get_default_theme () ) ),
121122 );
122123
123124 if ( $ this ->show_autoupdates ) {
@@ -436,6 +437,9 @@ protected function get_views() {
436437 $ count
437438 );
438439 break ;
440+ case 'default ' :
441+ $ text = __ ( 'Default ' ) . ' <span class="count">(1)</span> ' ;
442+ break ;
439443 }
440444
441445 if ( $ this ->is_site_themes ) {
@@ -562,6 +566,7 @@ public function column_name( $theme ) {
562566 'enable ' => '' ,
563567 'disable ' => '' ,
564568 'delete ' => '' ,
569+ 'default ' => '' ,
565570 );
566571
567572 $ stylesheet = $ theme ->get_stylesheet ();
@@ -949,9 +954,18 @@ public function single_row_columns( $item ) {
949954 if ( $ stylesheet !== $ template && $ item ->get_stylesheet () === $ stylesheet ) {
950955 $ active_theme_label = ' — ' . __ ( 'Active Child Theme ' );
951956 }
957+
958+ /* In case this is the network default theme */
959+ if ( $ item ->get_stylesheet () === $ item ->network_get_default_theme () ) {
960+ $ active_theme_label = ' — ' . __ ( 'Default Theme ' );
961+ }
952962 }
953963
954- echo "<td class='theme-title column-primary {$ extra_classes }'><strong> " . $ item ->display ( 'Name ' ) . $ active_theme_label . '</strong> ' ;
964+ printf ( "<td class='theme-title column-primary%s'><strong>%s%s</strong> " ,
965+ $ extra_classes ,
966+ $ item ->display ( 'Name ' ),
967+ $ active_theme_label
968+ );
955969
956970 $ this ->column_name ( $ item );
957971
0 commit comments