Changeset 56174 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 07/09/2023 07:50:52 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r54226 r56174 29 29 30 30 if ( ! file_exists( $src_file ) ) { 31 // If the file doesn't exist, attempt a URL fopen on the src link. 32 // This can occur with certain file replication plugins. 31 /* 32 * If the file doesn't exist, attempt a URL fopen on the src link. 33 * This can occur with certain file replication plugins. 34 */ 33 35 $src = _load_image_to_edit_path( $src, 'full' ); 34 36 } else { … … 160 162 161 163 if ( empty( $image_meta ) || ! is_array( $image_meta ) ) { 162 // Previously failed upload? 163 // If there is an uploaded file, make all sub-sizes and generate all of the attachment meta. 164 /* 165 * Previously failed upload? 166 * If there is an uploaded file, make all sub-sizes and generate all of the attachment meta. 167 */ 164 168 if ( ! empty( $image_file ) ) { 165 169 $image_meta = wp_create_image_subsizes( $image_file, $attachment_id ); … … 284 288 $threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id ); 285 289 286 // If the original image's dimensions are over the threshold, 287 // scale the image and use it as the "full" size. 290 /* 291 * If the original image's dimensions are over the threshold, 292 * scale the image and use it as the "full" size. 293 */ 288 294 if ( $threshold && ( $image_meta['width'] > $threshold || $image_meta['height'] > $threshold ) ) { 289 295 $editor = wp_get_image_editor( $file ); … … 305 311 306 312 if ( ! is_wp_error( $resized ) ) { 307 // Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg". 308 // This doesn't affect the sub-sizes names as they are generated from the original image (for best quality). 313 /* 314 * Append "-scaled" to the image file name. It will look like "my_image-scaled.jpg". 315 * This doesn't affect the sub-sizes names as they are generated from the original image (for best quality). 316 */ 309 317 $saved = $editor->save( $editor->generate_filename( 'scaled' ) ); 310 318
Note: See TracChangeset
for help on using the changeset viewer.