---
wp-includes/class-wp-image-editor-gd.php | 4 ++--
wp-includes/class-wp-image-editor-imagick.php | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/wp-includes/class-wp-image-editor-gd.php b/wp-includes/class-wp-image-editor-gd.php
index 3cc7c2ee..c3101107 100644
|
a
|
b
|
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 154 | 154 | * @since 5.1.0 |
| 155 | 155 | * |
| 156 | 156 | */ |
| 157 | | protected function update_crop_hash( $crop, $dst_w, $dst_h ) { |
| | 157 | protected function create_crop_hash( $crop, $dst_w, $dst_h ) { |
| 158 | 158 | if ( ! is_array( $crop ) ) { |
| 159 | 159 | return false; |
| 160 | 160 | } |
| … |
… |
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 218 | 218 | imagecopyresampled( $resized, $this->image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); |
| 219 | 219 | |
| 220 | 220 | if ( is_gd_image( $resized ) ) { |
| 221 | | $this->update_crop_hash( $crop, $dst_w, $dst_h ); |
| | 221 | $this->create_crop_hash( $crop, $dst_w, $dst_h ); |
| 222 | 222 | $this->update_size( $dst_w, $dst_h ); |
| 223 | 223 | return $resized; |
| 224 | 224 | } |
diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php
index fd817f4d..635c6819 100644
|
a
|
b
|
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 251 | 251 | * @since 5.1.0 |
| 252 | 252 | * |
| 253 | 253 | */ |
| 254 | | protected function update_crop_hash( $crop, $dst_w, $dst_h ) { |
| | 254 | protected function create_crop_hash( $crop, $dst_w, $dst_h ) { |
| 255 | 255 | if ( ! is_array( $crop ) ) { |
| 256 | 256 | return false; |
| 257 | 257 | } |
| … |
… |
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 289 | 289 | list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ) = $dims; |
| 290 | 290 | |
| 291 | 291 | if ( $crop ) { |
| 292 | | $this->update_crop_hash( $crop, $dst_w, $dst_h ); |
| | 292 | $this->create_crop_hash( $crop, $dst_w, $dst_h ); |
| 293 | 293 | return $this->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h ); |
| 294 | 294 | } |
| 295 | 295 | |