Make WordPress Core


Ignore:
Timestamp:
06/03/2015 03:12:19 PM (10 years ago)
Author:
helen
Message:

Media: move the thumbnail into the title column in list view.

This gives us more space for the title and row actions, and will make a responsive list table enhancement significantly easier.

props bradt for the initial patch.
fixes #29993 and #32255. see #32509 and #32395.

File:
1 edited

Legend:

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

    r32663 r32687  
    248248        $posts_columns = array();
    249249        $posts_columns['cb'] = '<input type="checkbox" />';
    250         $posts_columns['icon'] = '';
    251250        /* translators: column name */
    252251        $posts_columns['title'] = _x( 'File', 'column name' );
     
    362361
    363362        switch ( $column_name ) {
    364             case 'icon':
     363            case 'title':
    365364                list( $mime ) = explode( '/', $post->post_mime_type );
    366                 $attributes = 'class="column-icon media-icon ' . $mime . '-icon"' . $style;
     365
     366                echo "<div class='media-icon {$mime}-icon'>";
    367367
    368368                if ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) {
     
    375375                    }
    376376                }
    377                 break;
    378 
    379             case 'title':
     377
     378                echo '</div><div class="media-info">';
    380379?>
    381380                    <strong>
     
    389388                    _media_states( $post ); ?></strong>
    390389                    <p class="filename"><?php echo wp_basename( $post->guid ); ?></p>
     390                </div>
    391391<?php
    392392                break;
Note: See TracChangeset for help on using the changeset viewer.