Changeset 47122 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/image.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r47084 r47122 273 273 $threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id ); 274 274 275 // If the original image's dimensions are over the threshold, scale the image276 // and use it as the "full" size.275 // If the original image's dimensions are over the threshold, 276 // scale the image and use it as the "full" size. 277 277 if ( $threshold && ( $image_meta['width'] > $threshold || $image_meta['height'] > $threshold ) ) { 278 278 $editor = wp_get_image_editor( $file ); … … 283 283 } 284 284 285 // Resize the image 285 // Resize the image. 286 286 $resized = $editor->resize( $threshold, $threshold ); 287 287 $rotated = null; … … 306 306 } 307 307 } else { 308 // TODO: log errors.308 // TODO: Log errors. 309 309 } 310 310 } else { 311 // TODO: log errors.311 // TODO: Log errors. 312 312 } 313 313 } elseif ( ! empty( $exif_meta['orientation'] ) && (int) $exif_meta['orientation'] !== 1 ) { … … 336 336 } 337 337 } else { 338 // TODO: log errors.338 // TODO: Log errors. 339 339 } 340 340 } … … 435 435 436 436 if ( is_wp_error( $rotated ) ) { 437 // TODO: log errors.437 // TODO: Log errors. 438 438 } 439 439 } … … 444 444 445 445 if ( is_wp_error( $new_size_meta ) ) { 446 // TODO: log errors.446 // TODO: Log errors. 447 447 } else { 448 448 // Save the size meta value. … … 576 576 $editor = wp_get_image_editor( $file ); 577 577 578 if ( ! is_wp_error( $editor ) ) { // No support for this type of file 578 if ( ! is_wp_error( $editor ) ) { // No support for this type of file. 579 579 /* 580 580 * PDFs may have the same file filename as JPEGs. … … 716 716 $iptc = @iptcparse( $info['APP13'] ); 717 717 718 // Headline, "A brief synopsis of the caption ."718 // Headline, "A brief synopsis of the caption". 719 719 if ( ! empty( $iptc['2#105'][0] ) ) { 720 720 $meta['title'] = trim( $iptc['2#105'][0] ); 721 721 /* 722 722 * Title, "Many use the Title field to store the filename of the image, 723 * though the field may be used in many ways ."723 * though the field may be used in many ways". 724 724 */ 725 725 } elseif ( ! empty( $iptc['2#005'][0] ) ) { … … 727 727 } 728 728 729 if ( ! empty( $iptc['2#120'][0] ) ) { // description / legacy caption729 if ( ! empty( $iptc['2#120'][0] ) ) { // Description / legacy caption. 730 730 $caption = trim( $iptc['2#120'][0] ); 731 731
Note: See TracChangeset
for help on using the changeset viewer.