Make WordPress Core


Ignore:
Timestamp:
06/03/2015 03:07:22 PM (11 years ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r32667 r32686  
    582582        list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
    583583
    584         $extra_class = ' has-row-actions column-primary';
     584        $extra_class = ' column-primary';
    585585
    586586        foreach ( $columns as $column_name => $column_display_name ) {
     
    720720
    721721    /**
    722      * Get the name of default primary column for this specific list table.
     722     * Get the name of primary column for this specific list table.
    723723     *
    724724     * @since 4.3.0
    725725     * @access protected
    726726     *
    727      * @return string Name for the default primary column, in this case, 'plugin'.
    728      */
    729     protected function get_default_primary_column_name() {
     727     * @return string Unalterable name for the primary column, in this case, 'plugin'.
     728     */
     729    protected function get_primary_column_name() {
    730730        return 'plugin';
    731731    }
Note: See TracChangeset for help on using the changeset viewer.