Changeset 49108 for trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
- Timestamp:
- 10/08/2020 09:13:57 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
r48547 r49108 500 500 $size = $image_editor->get_size(); 501 501 502 $crop_x = round( ( $size['width'] * floatval( $request['x'] )) / 100.0 );503 $crop_y = round( ( $size['height'] * floatval( $request['y'] )) / 100.0 );504 $width = round( ( $size['width'] * floatval( $request['width'] )) / 100.0 );505 $height = round( ( $size['height'] * floatval( $request['height'] )) / 100.0 );502 $crop_x = round( ( $size['width'] * (float) $request['x'] ) / 100.0 ); 503 $crop_y = round( ( $size['height'] * (float) $request['y'] ) / 100.0 ); 504 $width = round( ( $size['width'] * (float) $request['width'] ) / 100.0 ); 505 $height = round( ( $size['height'] * (float) $request['height'] ) / 100.0 ); 506 506 507 507 $result = $image_editor->crop( $crop_x, $crop_y, $width, $height );
Note: See TracChangeset
for help on using the changeset viewer.