Make WordPress Core


Ignore:
Timestamp:
01/25/2016 10:54:52 PM (9 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/class-wp-ms-themes-list-table.php

    r35924 r36394  
    683683
    684684        $class = ! $allowed ? 'inactive' : 'active';
    685 
    686         $id = sanitize_html_class( $theme->get_stylesheet() );
    687 
    688685        if ( ! empty( $totals['upgrade'] ) && ! empty( $theme->update ) ) {
    689686            $class .= ' update';
    690687        }
    691688
    692         echo "<tr id='$id' class='$class'>";
     689        printf( '<tr class="%s" data-slug="%s">',
     690            esc_attr( $class ),
     691            esc_attr( $stylesheet )
     692        );
    693693
    694694        $this->single_row_columns( $theme );
Note: See TracChangeset for help on using the changeset viewer.