Make WordPress Core


Ignore:
Timestamp:
06/10/2015 07:46:39 PM (11 years ago)
Author:
helen
Message:

List tables: Use a class instead of inline styles for hidden columns.

fixes #32608.

File:
1 edited

Legend:

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

    r32722 r32724  
    947947                        $class = array( 'manage-column', "column-$column_key" );
    948948
    949                         $style = '';
    950                         if ( in_array( $column_key, $hidden ) )
    951                                 $style = 'display:none;';
    952 
    953                         $style = ' style="' . $style . '"';
     949                        if ( in_array( $column_key, $hidden ) ) {
     950                                $class[] = 'hidden';
     951                        }
    954952
    955953                        if ( 'cb' == $column_key )
     
    979977                                $class = "class='" . join( ' ', $class ) . "'";
    980978
    981                         echo "<th scope='col' $id $class $style>$column_display_name</th>";
     979                        echo "<th scope='col' $id $class>$column_display_name</th>";
    982980                }
    983981        }
     
    11381136                        }
    11391137
    1140                         $style = '';
    11411138                        if ( in_array( $column_name, $hidden ) ) {
    1142                                 $style = ' style="display:none;"';
     1139                                $classes .= ' hidden';
    11431140                        }
    11441141
    1145                         $attributes = "class='$classes'$style";
     1142                        $attributes = "class='$classes'";
    11461143
    11471144                        if ( 'cb' == $column_name ) {
Note: See TracChangeset for help on using the changeset viewer.