From ddfbfce2e677c18705921b1096267a3ef76fcafe Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Mon, 25 Jan 2016 22:54:52 +0000 Subject: [PATCH] Pass data consistently on plugin, network plugin, and network theme screens. List tables on these three screens look similar but come with unexpected caveats. The network themes screen in particular has been neglected, using a `.plugin` class to inherit its sibling's styles and not providing classes and data attributes that the other two offer. This will provide some more consistency. Fixes #35335. git-svn-id: https://develop.svn.wordpress.org/trunk@36394 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-ms-themes-list-table.php | 8 ++++---- src/wp-admin/includes/update.php | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) 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 acf5f8f953..825c047672 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 @@ -682,14 +682,14 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $stylesheet = $theme->get_stylesheet(); $class = ! $allowed ? 'inactive' : 'active'; - - $id = sanitize_html_class( $theme->get_stylesheet() ); - if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) { $class .= ' update'; } - echo ""; + printf( '', + esc_attr( $class ), + esc_attr( $stylesheet ) + ); $this->single_row_columns( $theme ); diff --git a/src/wp-admin/includes/update.php b/src/wp-admin/includes/update.php index 72672c687f..3b828ed3e0 100644 --- a/src/wp-admin/includes/update.php +++ b/src/wp-admin/includes/update.php @@ -456,7 +456,9 @@ function wp_theme_update_row( $theme_key, $theme ) { $wp_list_table = _get_list_table('WP_MS_Themes_List_Table'); - echo '
'; + $active = $theme->is_allowed( 'network' ) ? ' active': ''; + + echo '
'; if ( ! current_user_can('update_themes') ) { /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */ printf( __( 'There is a new version of %1$s available. View version %4$s details.'), @@ -475,7 +477,7 @@ function wp_theme_update_row( $theme_key, $theme ) { ); } else { /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number, 5: update URL */ - printf( __( 'There is a new version of %1$s available. View version %4$s details or update now.' ), + printf( __( 'There is a new version of %1$s available. View version %4$s details or update now.' ), $theme['Name'], esc_url( $details_url ), esc_attr( $theme['Name'] ),