Changeset 22749
- Timestamp:
- 11/21/2012 12:05:24 PM (12 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image-edit.php
r22510 r22749 711 711 712 712 if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { 713 $file_url = wp_get_attachment_url($post_id); 714 if ( $thumb = $meta['sizes']['thumbnail'] ) 715 $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); 716 else 717 $return->thumbnail = "$file_url?w=128&h=128"; 713 // Check if it's an image edit from attachment edit screen 714 if ( false !== strpos( wp_get_referer(), 'post.php' ) ) { 715 $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true ); 716 $return->thumbnail = $thumb_url[0]; 717 } else { 718 $file_url = wp_get_attachment_url($post_id); 719 if ( $thumb = $meta['sizes']['thumbnail'] ) 720 $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); 721 else 722 $return->thumbnail = "$file_url?w=128&h=128"; 723 } 718 724 } 719 725 } else { -
trunk/wp-admin/includes/media.php
r22748 r22749 2270 2270 2271 2271 <div class="wp_attachment_image" id="media-head-<?php echo $attachment_id; ?>"> 2272 <p ><img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" width="<?php echo $thumb_url[1]; ?>" alt="" /></p>2272 <p id="thumbnail-head-<?php echo $attachment_id; ?>"><img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" alt="" /></p> 2273 2273 <p><?php echo $image_edit_button; ?></p> 2274 2274 </div>
Note: See TracChangeset
for help on using the changeset viewer.