Ticket #29993: 29993.4.diff
File 29993.4.diff, 2.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/list-tables.css
296 296 float: left; 297 297 } 298 298 299 .fixed .column-icon { 300 width: 80px; 299 /* Media file column */ 300 table.media .column-title { 301 position: relative; 301 302 } 302 303 304 table.media .column-title .media-icon { 305 position: absolute; 306 top: 8px; /* match cell padding */ 307 left: 10px; /* match cell padding */ 308 } 309 310 table.media .column-title .media-info, 311 table.media .column-title .row-actions { 312 margin-left: 70px; /* 60px image + margin */ 313 } 314 303 315 /* @todo: pick a consistent list table selector */ 304 316 .wp-list-table a { 305 317 -webkit-transition: none; … … 1622 1634 .column-tags, 1623 1635 .tags .column-description, 1624 1636 .media .column-parent, 1637 .media .column-comments, 1625 1638 .users .column-email, 1626 1639 .users .column-name, 1627 1640 .sites .column-registered, … … 1650 1663 word-wrap: normal; 1651 1664 } 1652 1665 1666 /* Media */ 1667 .media .column-title { 1668 width: auto; 1669 } 1670 1653 1671 /* Quick Edit and Bulk Edit */ 1654 1672 #wpbody-content .quick-edit-row-post .inline-edit-col-left, 1655 1673 #wpbody-content .quick-edit-row-post .inline-edit-col-right, -
src/wp-admin/includes/class-wp-media-list-table.php
247 247 public function get_columns() { 248 248 $posts_columns = array(); 249 249 $posts_columns['cb'] = '<input type="checkbox" />'; 250 $posts_columns['icon'] = '';251 250 /* translators: column name */ 252 251 $posts_columns['title'] = _x( 'File', 'column name' ); 253 252 $posts_columns['author'] = __( 'Author' ); … … 361 360 echo "<td $attributes>"; 362 361 363 362 switch ( $column_name ) { 364 case ' icon':363 case 'title': 365 364 list( $mime ) = explode( '/', $post->post_mime_type ); 366 $attributes = 'class="column-icon media-icon ' . $mime . '-icon"' . $style;367 365 366 echo "<div class='media-icon {$mime}-icon'>"; 367 368 368 if ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) { 369 369 if ( $this->is_trash || ! $user_can_edit ) { 370 370 echo $thumb; … … 374 374 </a><?php 375 375 } 376 376 } 377 break;378 377 379 case 'title':378 echo '</div><div class="media-info">'; 380 379 ?> 381 380 <strong> 382 381 <?php if ( $this->is_trash || ! $user_can_edit ) { … … 388 387 <?php } 389 388 _media_states( $post ); ?></strong> 390 389 <p class="filename"><?php echo wp_basename( $post->guid ); ?></p> 390 </div> 391 391 <?php 392 392 break; 393 393