Changeset 47084 for trunk/src/wp-admin/includes/image-edit.php
- Timestamp:
- 01/18/2020 12:52:28 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/image-edit.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image-edit.php
r47065 r47084 200 200 <?php 201 201 202 // On some setups GD library does not provide imagerotate() - Ticket #11536 202 // On some setups GD library does not provide imagerotate() - Ticket #11536. 203 203 if ( wp_image_editor_supports( 204 204 array( … … 602 602 $h = $size['height']; 603 603 604 $scale = 1 / _image_get_preview_ratio( $w, $h ); // discard preview scaling604 $scale = 1 / _image_get_preview_ratio( $w, $h ); // Discard preview scaling. 605 605 $image->crop( $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); 606 606 } else { 607 $scale = 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // discard preview scaling607 $scale = 1 / _image_get_preview_ratio( imagesx( $image ), imagesy( $image ) ); // Discard preview scaling. 608 608 $image = _crop_image_resource( $image, $sel->x * $scale, $sel->y * $scale, $sel->w * $scale, $sel->h * $scale ); 609 609 } … … 956 956 957 957 if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) { 958 // Check if it's an image edit from attachment edit screen 958 // Check if it's an image edit from attachment edit screen. 959 959 if ( ! empty( $_REQUEST['context'] ) && 'edit-attachment' == $_REQUEST['context'] ) { 960 960 $thumb_url = wp_get_attachment_image_src( $post_id, array( 900, 600 ), true );
Note: See TracChangeset
for help on using the changeset viewer.