Make WordPress Core


Ignore:
Timestamp:
07/17/2014 09:13:53 AM (11 years ago)
Author:
DrewAPicture
Message:

Fix syntax for single- and multi-line comments in wp-admin-directory files.

See #28931.

File:
1 edited

Legend:

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

    r28808 r29206  
    4848        $dst_file = str_replace( basename( $src_file ), 'cropped-' . basename( $src_file ), $src_file );
    4949
    50     // The directory containing the original file may no longer exist when
    51     // using a replication plugin.
     50    /*
     51     * The directory containing the original file may no longer exist when
     52     * using a replication plugin.
     53     */
    5254    wp_mkdir_p( dirname( $dst_file ) );
    5355
     
    8082        $metadata['height'] = $imagesize[1];
    8183
    82         // Make the file path relative to the upload dir
     84        // Make the file path relative to the upload dir.
    8385        $metadata['file'] = _wp_relative_upload_path($file);
    8486
    85         // make thumbnails and other intermediate sizes
     87        // Make thumbnails and other intermediate sizes.
    8688        global $_wp_additional_image_sizes;
    8789
     
    121123        }
    122124
    123         // fetch additional metadata from exif/iptc
     125        // Fetch additional metadata from EXIF/IPTC.
    124126        $image_meta = wp_read_image_metadata( $file );
    125127        if ( $image_meta )
     
    135137
    136138    if ( $support && ! empty( $metadata['image']['data'] ) ) {
    137         // check for existing cover
     139        // Check for existing cover.
    138140        $hash = md5( $metadata['image']['data'] );
    139141        $posts = get_posts( array(
     
    188190    }
    189191
    190     // remove the blob of binary data from the array
     192    // Remove the blob of binary data from the array.
    191193    if ( isset( $metadata['image']['data'] ) )
    192194        unset( $metadata['image']['data'] );
     
    255257    list( , , $sourceImageType ) = getimagesize( $file );
    256258
    257     // exif contains a bunch of data we'll probably never need formatted in ways
    258     // that are difficult to use. We'll normalize it and just extract the fields
    259     // that are likely to be useful. Fractions and numbers are converted to
    260     // floats, dates to unix timestamps, and everything else to strings.
     259    /*
     260     * EXIF contains a bunch of data we'll probably never need formatted in ways
     261     * that are difficult to use. We'll normalize it and just extract the fields
     262     * that are likely to be useful. Fractions and numbers are converted to
     263     * floats, dates to unix timestamps, and everything else to strings.
     264     */
    261265    $meta = array(
    262266        'aperture' => 0,
     
    272276    );
    273277
    274     // read iptc first, since it might contain data not available in exif such
    275     // as caption, description etc
     278    /*
     279     * Read IPTC first, since it might contain data not available in exif such
     280     * as caption, description etc.
     281     */
    276282    if ( is_callable( 'iptcparse' ) ) {
    277283        getimagesize( $file, $info );
     
    280286            $iptc = iptcparse( $info['APP13'] );
    281287
    282             // headline, "A brief synopsis of the caption."
    283             if ( ! empty( $iptc['2#105'][0] ) )
     288            // Headline, "A brief synopsis of the caption."
     289            if ( ! empty( $iptc['2#105'][0] ) ) {
    284290                $meta['title'] = trim( $iptc['2#105'][0] );
    285             // title, "Many use the Title field to store the filename of the image, though the field may be used in many ways."
    286             elseif ( ! empty( $iptc['2#005'][0] ) )
     291            /*
     292             * Title, "Many use the Title field to store the filename of the image,
     293             * though the field may be used in many ways."
     294             */
     295            } elseif ( ! empty( $iptc['2#005'][0] ) ) {
    287296                $meta['title'] = trim( $iptc['2#005'][0] );
     297            }
    288298
    289299            if ( ! empty( $iptc['2#120'][0] ) ) { // description / legacy caption
     
    569579        $dst_file = dirname( $dst_file ) . '/' . wp_unique_filename( dirname( $dst_file ), basename( $dst_file ) );
    570580
    571         // The directory containing the original file may no longer exist when
    572         // using a replication plugin.
     581        /*
     582         * The directory containing the original file may no longer
     583         * exist when using a replication plugin.
     584         */
    573585        wp_mkdir_p( dirname( $dst_file ) );
    574586
Note: See TracChangeset for help on using the changeset viewer.