Changeset 58457 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 06/21/2024 08:35:25 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r58447 r58457 622 622 $size = $image_editor->get_size(); 623 623 624 $crop_x = round( ( $size['width'] * $args['left'] ) / 100.0 );625 $crop_y = round( ( $size['height'] * $args['top'] ) / 100.0 );626 $width = round( ( $size['width'] * $args['width'] ) / 100.0 );627 $height = round( ( $size['height'] * $args['height'] ) / 100.0 );624 $crop_x = (int) round( ( $size['width'] * $args['left'] ) / 100.0 ); 625 $crop_y = (int) round( ( $size['height'] * $args['top'] ) / 100.0 ); 626 $width = (int) round( ( $size['width'] * $args['width'] ) / 100.0 ); 627 $height = (int) round( ( $size['height'] * $args['height'] ) / 100.0 ); 628 628 629 629 if ( $size['width'] !== $width && $size['height'] !== $height ) {
Note: See TracChangeset
for help on using the changeset viewer.