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. Built from https://develop.svn.wordpress.org/trunk@36394 git-svn-id: http://core.svn.wordpress.org/trunk@36361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0b69f2cd63
commit
d28ce2a1e4
|
@ -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 "<tr id='$id' class='$class'>";
|
||||
printf( '<tr class="%s" data-slug="%s">',
|
||||
esc_attr( $class ),
|
||||
esc_attr( $stylesheet )
|
||||
);
|
||||
|
||||
$this->single_row_columns( $theme );
|
||||
|
||||
|
|
|
@ -456,7 +456,9 @@ function wp_theme_update_row( $theme_key, $theme ) {
|
|||
|
||||
$wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
|
||||
|
||||
echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
$active = $theme->is_allowed( 'network' ) ? ' active': '';
|
||||
|
||||
echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
|
||||
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. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a>.'),
|
||||
|
@ -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. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" aria-label="update %3$s now">update now</a>.' ),
|
||||
printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ),
|
||||
$theme['Name'],
|
||||
esc_url( $details_url ),
|
||||
esc_attr( $theme['Name'] ),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36393';
|
||||
$wp_version = '4.5-alpha-36394';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue