Ticket #10531: naming-10531.patch
| File naming-10531.patch, 2.1 KB (added by stephanreiter, 4 years ago) |
|---|
-
wp-admin/includes/image.php
109 109 $sizes = apply_filters('intermediate_image_sizes', $sizes); 110 110 111 111 foreach ($sizes as $size) { 112 $resized = image_make_intermediate_size( $full_path_file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") );112 $resized = image_make_intermediate_size( $full_path_file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop"), $size ); 113 113 if ( $resized ) 114 114 $metadata['sizes'][$size] = $resized; 115 115 } -
wp-includes/media.php
385 385 $rotated = false; 386 386 if ( IMAGETYPE_JPEG == $orig_type ) { 387 387 // rotate if EXIF 'Orientation' is set 388 $exif = exif_read_data($file, null, true);388 $exif = is_callable('exif_read_data') ? @exif_read_data($file, null, true) : null; 389 389 if ( $exif && isset($exif['IFD0']) && is_array($exif['IFD0']) && isset($exif['IFD0']['Orientation']) ) { 390 390 if ( 6 == $exif['IFD0']['Orientation'] ) 391 391 $rotated = rotate_image($newimage, 90); … … 432 432 * @param bool $crop Optional, default is false. Whether to crop image to specified height and width or resize. 433 433 * @return bool|array False, if no image was created. Metadata array on success. 434 434 */ 435 function image_make_intermediate_size($file, $width, $height, $crop=false ) {435 function image_make_intermediate_size($file, $width, $height, $crop=false, $suffix = null) { 436 436 if ( $width || $height ) { 437 $resized_file = image_resize($file, $width, $height, $crop );437 $resized_file = image_resize($file, $width, $height, $crop, $suffix); 438 438 if ( !is_wp_error($resized_file) && $resized_file && $info = getimagesize($resized_file) ) { 439 439 $resized_file = apply_filters('image_make_intermediate_size', $resized_file); 440 440 return array(