diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php index d2a2203056..fb3c33e7ad 100644 --- a/src/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/src/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -618,7 +618,26 @@ class WP_MS_Themes_List_Table extends WP_List_Table { break; case 'name': - echo "" . $item->display('Name') . ""; + + $active_theme_label = ''; + + /* The presence of the site_id property means that this is a subsite view and a label for the active theme needs to be added */ + if ( ! empty( $this->site_id ) ) { + $stylesheet = get_blog_option( $this->site_id, 'stylesheet' ); + $template = get_blog_option( $this->site_id, 'template' ); + + /* Add a label for the active template */ + if ( $item->get_template() === $template ) { + $active_theme_label = ' — ' . __( 'Active Theme' ); + } + + /* In case this is a child theme, label it properly */ + if ( $stylesheet !== $template && $item->get_stylesheet() === $stylesheet) { + $active_theme_label = ' — ' . __( 'Active Child Theme' ); + } + } + + echo "" . $item->display( 'Name' ) . $active_theme_label . ''; $this->column_name( $item );