WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/13/2011 01:50:23 AM (11 years ago)
Author:
nacin
Message:

Fix plugin-install column hiding and widths. props PeteMall, fixes #16210.

File:
1 edited

Legend:

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

    r17090 r17281  
    152152            'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
    153153        );
     154       
     155        list( $columns, $hidden ) = $this->get_column_info();
     156
     157        $style = array();
     158        foreach ( $columns as $column_name => $column_display_name ) {
     159            $style[ $column_name ] = in_array( $column_name, $hidden ) ? 'style="display:none;"' : '';
     160        }
    154161
    155162        foreach ( (array) $this->items as $plugin ) {
     
    206213        ?>
    207214        <tr>
    208             <td class="name"><strong><?php echo $title; ?></strong>
     215            <td class="name column-name"<?php echo $style['name']; ?>><strong><?php echo $title; ?></strong>
    209216                <div class="action-links"><?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?></div>
    210217            </td>
    211             <td class="vers"><?php echo $version; ?></td>
    212             <td class="vers">
     218            <td class="vers column-version"<?php echo $style['version']; ?>><?php echo $version; ?></td>
     219            <td class="vers column-rating"<?php echo $style['rating']; ?>>
    213220                <div class="star-holder" title="<?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings'] ), number_format_i18n( $plugin['num_ratings'] ) ) ?>">
    214221                    <div class="star star-rating" style="width: <?php echo esc_attr( $plugin['rating'] ) ?>px"></div>
     
    220227                </div>
    221228            </td>
    222             <td class="desc"><?php echo $description, $author; ?></td>
     229            <td class="desc column-description"<?php echo $style['description']; ?>><?php echo $description, $author; ?></td>
    223230        </tr>
    224231        <?php
Note: See TracChangeset for help on using the changeset viewer.