WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/25/2016 10:54:52 PM (4 years ago)
Author:
obenland
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/update.php

    r36032 r36394  
    457457    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    458458
    459     echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
     459    $active = $theme->is_allowed( 'network' ) ? ' active': '';
     460
     461    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">';
    460462    if ( ! current_user_can('update_themes') ) {
    461463        /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */
     
    476478    } else {
    477479        /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number, 5: update URL */
    478         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>.' ),
     480        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>.' ),
    479481            $theme['Name'],
    480482            esc_url( $details_url ),
Note: See TracChangeset for help on using the changeset viewer.