Ticket #21391: 21391.thumbnail-refresh.patch
File 21391.thumbnail-refresh.patch, 2.0 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/media.php
2141 2141 <div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div> 2142 2142 2143 2143 <div class="wp_attachment_image" id="media-head-<?php echo $attachment_id; ?>"> 2144 <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>2144 <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> 2145 2145 <p><?php echo $image_edit_button; ?></p> 2146 2146 </div> 2147 2147 <div style="display:none" class="image-editor" id="image-editor-<?php echo $attachment_id; ?>"></div> -
wp-admin/includes/image-edit.php
711 711 update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes); 712 712 713 713 if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { 714 $file_url = wp_get_attachment_url($post_id); 715 if ( $thumb = $meta['sizes']['thumbnail'] ) 716 $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); 717 else 718 $return->thumbnail = "$file_url?w=128&h=128"; 714 // Check if it's an image edit from attachment edit screen 715 if ( false !== strpos( wp_get_referer(), 'post.php' ) ) { 716 $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true ); 717 $return->thumbnail = $thumb_url[0]; 718 } else { 719 $file_url = wp_get_attachment_url($post_id); 720 if ( $thumb = $meta['sizes']['thumbnail'] ) 721 $return->thumbnail = path_join( dirname($file_url), $thumb['file'] ); 722 else 723 $return->thumbnail = "$file_url?w=128&h=128"; 724 } 719 725 } 720 726 } else { 721 727 $delete = true;