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-edit.php

    r28366 r29206  
    412412        return $image;
    413413
    414     // expand change operations
     414    // Expand change operations.
    415415    foreach ( $changes as $key => $obj ) {
    416416        if ( isset($obj->r) ) {
     
    430430    }
    431431
    432     // combine operations
     432    // Combine operations.
    433433    if ( count($changes) > 1 ) {
    434434        $filtered = array($changes[0]);
     
    454454    }
    455455
    456     // image resource before applying the changes
     456    // Image resource before applying the changes.
    457457    if ( $image instanceof WP_Image_Editor ) {
    458458
     
    541541        $img = image_edit_apply_changes( $img, $changes );
    542542
    543     // scale the image
     543    // Scale the image.
    544544    $size = $img->get_size();
    545545    $w = $size['width'];
     
    577577        if ( $parts['basename'] != $data['file'] ) {
    578578            if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {
    579                 // delete only if it's edited image
     579
     580                // Delete only if it's edited image.
    580581                if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) {
    581582
     
    602603            if ( isset($meta['sizes'][$default_size]) && $meta['sizes'][$default_size]['file'] != $data['file'] ) {
    603604                if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) {
    604                     // delete only if it's edited image
     605
     606                    // Delete only if it's edited image
    605607                    if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) {
    606608                        /** This filter is documented in wp-admin/custom-header.php */
     
    662664        $sY = $size['height'];
    663665
    664         // check if it has roughly the same w / h ratio
     666        // Check if it has roughly the same w / h ratio.
    665667        $diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2);
    666668        if ( -0.1 < $diff && $diff < 0.1 ) {
    667             // scale the full size image
     669            // Scale the full size image.
    668670            if ( $img->resize( $fwidth, $fheight ) )
    669671                $scaled = true;
     
    694696        $backup_sizes = array();
    695697
    696     // generate new filename
     698    // Generate new filename.
    697699    $path = get_attached_file($post_id);
    698700    $path_parts = pathinfo( $path );
     
    720722    }
    721723
    722     // save the full-size file, also needed to create sub-sizes
     724    // Save the full-size file, also needed to create sub-sizes.
    723725    if ( !wp_save_image_file($new_path, $img, $post->post_mime_type, $post_id) ) {
    724726        $return->error = esc_js( __('Unable to save the image.') );
Note: See TracChangeset for help on using the changeset viewer.