diff --git src/wp-admin/css/list-tables.css src/wp-admin/css/list-tables.css
index 6feaa22..dced16c 100644
|
|
|
table.fixed { |
| 267 | 267 | width: 74px; |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | | .fixed .column-comment .comment-author { |
| | 270 | .fixed .column-comment .comment-author, |
| | 271 | .media .column-title .media-icon { |
| 271 | 272 | display: none; |
| 272 | 273 | } |
| 273 | 274 | |
| … |
… |
div.action-links, |
| 1873 | 1874 | box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); |
| 1874 | 1875 | } |
| 1875 | 1876 | } |
| | 1877 | |
| | 1878 | @media screen and ( max-width: 450px ) { |
| | 1879 | /* Columns to hide */ |
| | 1880 | .media .column-icon, |
| | 1881 | .media .column-comments { |
| | 1882 | display: none; |
| | 1883 | } |
| | 1884 | |
| | 1885 | .media .column-title .media-icon { |
| | 1886 | display: block; |
| | 1887 | padding-bottom: 5px; |
| | 1888 | } |
| | 1889 | } |
| | 1890 | No newline at end of file |
diff --git src/wp-admin/includes/class-wp-media-list-table.php src/wp-admin/includes/class-wp-media-list-table.php
index 3629f25..dac5a3a 100644
|
|
|
foreach ( $columns as $column_name => $column_display_name ) { |
| 308 | 308 | list( $mime ) = explode( '/', $post->post_mime_type ); |
| 309 | 309 | $attributes = 'class="column-icon media-icon ' . $mime . '-icon"' . $style; |
| 310 | 310 | ?> |
| 311 | | <td <?php echo $attributes ?>><?php |
| 312 | | if ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) { |
| 313 | | if ( $this->is_trash || ! $user_can_edit ) { |
| 314 | | echo $thumb; |
| 315 | | } else { |
| 316 | | ?> |
| 317 | | <a href="<?php echo get_edit_post_link( $post->ID, true ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); ?>"> |
| 318 | | <?php echo $thumb; ?> |
| 319 | | </a> |
| 320 | | |
| 321 | | <?php } |
| 322 | | } |
| 323 | | ?> |
| 324 | | </td> |
| | 311 | <td <?php echo $attributes ?>><?php $this->column_icon( $post ); ?></td> |
| 325 | 312 | <?php |
| 326 | 313 | break; |
| 327 | 314 | |
| 328 | 315 | case 'title': |
| 329 | 316 | ?> |
| 330 | 317 | <td <?php echo $attributes ?>><strong> |
| | 318 | <div class="media-icon"> |
| | 319 | <?php $this->column_icon( $post ); ?> |
| | 320 | </div> |
| | 321 | |
| 331 | 322 | <?php if ( $this->is_trash || ! $user_can_edit ) { |
| 332 | 323 | echo $att_title; |
| 333 | 324 | } else { ?> |
| … |
… |
foreach ( $columns as $column_name => $column_display_name ) { |
| 493 | 484 | <?php endwhile; |
| 494 | 485 | } |
| 495 | 486 | |
| | 487 | public function column_icon( $post ) { |
| | 488 | $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ); |
| | 489 | |
| | 490 | if ( ! $thumb ) { |
| | 491 | return; |
| | 492 | } |
| | 493 | |
| | 494 | if ( $this->is_trash || ! current_user_can( 'edit_post', $post->ID ) ) { |
| | 495 | echo $thumb; |
| | 496 | } else { |
| | 497 | printf( |
| | 498 | '<a href="%s" title="%s">%s</a>', |
| | 499 | get_edit_post_link( $post->ID, true ), |
| | 500 | esc_attr( sprintf( __( 'Edit “%s”' ), _draft_or_post_title() ) ), |
| | 501 | $thumb |
| | 502 | ); |
| | 503 | } |
| | 504 | } |
| | 505 | |
| 496 | 506 | private function _get_row_actions( $post, $att_title ) { |
| 497 | 507 | $actions = array(); |
| 498 | 508 | |