List tables: tighten up primary column handling for plugins and multisite themes.

These shouldn't be able to have their primary column reassigned by default. Also removes the `has-row-actions` class as these list tables always have row actions visible and the JS for visual toggling conflicts. The `column-primary` class remains.

props stephdau.
see #25408.


git-svn-id: https://develop.svn.wordpress.org/trunk@32686 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi
2015-06-03 15:07:22 +00:00
parent ab747208b2
commit fa29d5bb80
2 changed files with 15 additions and 10 deletions

View File

@@ -581,7 +581,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
$extra_class = ' has-row-actions column-primary';
$extra_class = ' column-primary';
foreach ( $columns as $column_name => $column_display_name ) {
$style = '';
@@ -719,14 +719,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
}
/**
* Get the name of default primary column for this specific list table.
* Get the name of primary column for this specific list table.
*
* @since 4.3.0
* @access protected
*
* @return string Name for the default primary column, in this case, 'plugin'.
* @return string Unalterable name for the primary column, in this case, 'plugin'.
*/
protected function get_default_primary_column_name() {
protected function get_primary_column_name() {
return 'plugin';
}
}