Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r47084 r47122  
    273273        $threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id );
    274274
    275         // If the original image's dimensions are over the threshold, scale the image
    276         // 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.
    277277        if ( $threshold && ( $image_meta['width'] > $threshold || $image_meta['height'] > $threshold ) ) {
    278278            $editor = wp_get_image_editor( $file );
     
    283283            }
    284284
    285             // Resize the image
     285            // Resize the image.
    286286            $resized = $editor->resize( $threshold, $threshold );
    287287            $rotated = null;
     
    306306                    }
    307307                } else {
    308                     // TODO: log errors.
     308                    // TODO: Log errors.
    309309                }
    310310            } else {
    311                 // TODO: log errors.
     311                // TODO: Log errors.
    312312            }
    313313        } elseif ( ! empty( $exif_meta['orientation'] ) && (int) $exif_meta['orientation'] !== 1 ) {
     
    336336                    }
    337337                } else {
    338                     // TODO: log errors.
     338                    // TODO: Log errors.
    339339                }
    340340            }
     
    435435
    436436        if ( is_wp_error( $rotated ) ) {
    437             // TODO: log errors.
     437            // TODO: Log errors.
    438438        }
    439439    }
     
    444444
    445445            if ( is_wp_error( $new_size_meta ) ) {
    446                 // TODO: log errors.
     446                // TODO: Log errors.
    447447            } else {
    448448                // Save the size meta value.
     
    576576            $editor = wp_get_image_editor( $file );
    577577
    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.
    579579                /*
    580580                 * PDFs may have the same file filename as JPEGs.
     
    716716            $iptc = @iptcparse( $info['APP13'] );
    717717
    718             // Headline, "A brief synopsis of the caption."
     718            // Headline, "A brief synopsis of the caption".
    719719            if ( ! empty( $iptc['2#105'][0] ) ) {
    720720                $meta['title'] = trim( $iptc['2#105'][0] );
    721721                /*
    722722                * 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".
    724724                */
    725725            } elseif ( ! empty( $iptc['2#005'][0] ) ) {
     
    727727            }
    728728
    729             if ( ! empty( $iptc['2#120'][0] ) ) { // description / legacy caption
     729            if ( ! empty( $iptc['2#120'][0] ) ) { // Description / legacy caption.
    730730                $caption = trim( $iptc['2#120'][0] );
    731731
Note: See TracChangeset for help on using the changeset viewer.