Ticket #32254: 32254.6.just-the-image-link.patch
File 32254.6.just-the-image-link.patch, 4.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
264 264 color: #00a0d2; 265 265 } 266 266 267 a:focus { 267 a:focus, 268 a:focus .media-icon img { 268 269 color: #124964; 269 270 -webkit-box-shadow: 270 271 0 0 0 1px #5b9dd9, … … 531 532 } 532 533 533 534 .widefat.media .check-column { 534 padding-top: 8px;535 padding-top: 10px; 535 536 } 536 537 537 538 .widefat thead td.check-column, … … 2029 2030 2030 2031 /* - Only used once or twice in all of WP - deprecate for global style 2031 2032 ------------------------------------------------------------------------------*/ 2032 td.media-icon { 2033 .media-icon { 2034 width: 62px; /* icon + border */ 2033 2035 text-align: center; 2034 width: 80px;2035 padding-top: 8px;2036 padding-bottom: 8px;2037 2036 } 2038 2037 2039 td.media-icon a { 2040 display: inline-block; 2041 } 2042 2043 td.media-icon img { 2044 display: block; 2045 max-width: 80px; 2046 max-height: 60px; 2047 width: auto; 2048 height: auto; 2038 .media-icon img { 2049 2039 border: 1px solid #e7e7e7; 2050 2040 border: 1px solid rgba(0, 0, 0, 0.07); 2051 2041 } -
src/wp-admin/css/list-tables.css
339 339 padding-left: 3px; 340 340 } 341 341 342 343 342 td.column-title strong, 344 343 td.plugin-title strong { 345 344 display: block; … … 352 351 margin: 6px 0; 353 352 } 354 353 355 /* Media file column */356 table.media .column-title {357 position: relative;358 }359 360 354 table.media .column-title .media-icon { 361 position: absolute;362 top: 8px; /* match cell padding */363 left: 10px; /* match cell padding*/355 float: left; 356 min-height: 60px; 357 margin: 0 9px 0 -1px; /* compensate border on image */ 364 358 } 365 359 366 360 table.media .column-title .media-icon img { 367 361 max-width: 60px; 368 362 height: auto; 363 vertical-align: top; /* remove descender white-space */ 369 364 } 370 365 371 366 table.media .column-title .media-info, … … 373 368 margin-left: 70px; /* 60px image + margin */ 374 369 } 375 370 376 table.media .column-title . media-info p{371 table.media .column-title .filename { 377 372 margin-bottom: 0.2em; 378 373 } 379 374 -
src/wp-admin/includes/class-wp-media-list-table.php
340 340 341 341 $user_can_edit = current_user_can( 'edit_post', $post->ID ); 342 342 $att_title = _draft_or_post_title(); 343 ?>344 <div class="media-icon <?php echo $mime ?>-icon">345 <?php346 343 347 $thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true );344 $thumb = wp_get_attachment_image( $post->ID, array( 60, 60 ), true, array( 'alt' => '' ) ); 348 345 if ( $thumb ) { 346 349 347 if ( $this->is_trash || ! $user_can_edit ) { 350 echo $thumb; 351 } else { ?> 352 <a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php 353 echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); 354 ?>"><?php echo $thumb; ?></a><?php 348 $link_start = $link_end = ''; 349 } else { 350 $link_start = '<a href="' . get_edit_post_link( $post->ID ) . '">'; 351 $link_end = '</a>'; 355 352 } 356 }357 353 358 ?> 359 </div> 360 <div class="media-info"> 361 <strong> 354 ?> 355 <strong><?php echo $link_start ?><span class='media-icon <?php echo sanitize_html_class( $mime . '-icon' ); ?>'><?php echo $thumb; ?></span> 356 <span aria-hidden="true"><?php echo $att_title ; ?></span><span class="screen-reader-text"><?php printf( __( 'Edit “%s”' ), $att_title ); ?></span><?php echo $link_end; ?> 357 <?php _media_states( $post ); ?> 358 </strong><p class="filename"><span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span> 359 <?php echo wp_basename( $post->guid ); ?></p> 362 360 <?php 363 if ( $this->is_trash || ! $user_can_edit ) { 364 echo $att_title; 365 } else { ?> 366 <a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php 367 echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); 368 ?>"><?php echo $att_title; ?></a><?php 369 } 370 _media_states( $post ); 371 ?> 372 </strong> 373 <p class="filename"><?php echo wp_basename( $post->guid ); ?></p> 374 </div> 375 <?php 361 } 376 362 } 377 363 378 364 /**