diff --git wp-includes/class-wp-image-editor-gd.php wp-includes/class-wp-image-editor-gd.php
index 050e696..bb69b62 100644
|
|
|
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 173 | 173 | * Processes current image and saves to disk |
| 174 | 174 | * multiple sizes from single source. |
| 175 | 175 | * |
| | 176 | * 'width' and 'height' are required. |
| | 177 | * 'crop' defaults to false when not provided. |
| | 178 | * |
| 176 | 179 | * @since 3.5.0 |
| 177 | 180 | * @access public |
| 178 | 181 | * |
| 179 | | * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... } |
| | 182 | * @param array $sizes { {'width'=>int, 'height'=>int, ['crop'=>bool]}, ... } |
| 180 | 183 | * @return array |
| 181 | 184 | */ |
| 182 | 185 | public function multi_resize( $sizes ) { |
| … |
… |
class WP_Image_Editor_GD extends WP_Image_Editor { |
| 184 | 187 | $orig_size = $this->size; |
| 185 | 188 | |
| 186 | 189 | foreach ( $sizes as $size => $size_data ) { |
| | 190 | if ( ! ( isset( $size_data['width'] ) && isset( $size_data['height'] ) ) ) |
| | 191 | continue; |
| | 192 | |
| | 193 | if ( ! isset( $size_data['crop'] ) ) |
| | 194 | $size_data['crop'] = false; |
| | 195 | |
| 187 | 196 | $image = $this->_resize( $size_data['width'], $size_data['height'], $size_data['crop'] ); |
| 188 | 197 | |
| 189 | 198 | if( ! is_wp_error( $image ) ) { |
diff --git wp-includes/class-wp-image-editor-imagick.php wp-includes/class-wp-image-editor-imagick.php
index 457b7fc..653eb8a 100644
|
|
|
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 245 | 245 | * Processes current image and saves to disk |
| 246 | 246 | * multiple sizes from single source. |
| 247 | 247 | * |
| | 248 | * 'width' and 'height' are required. |
| | 249 | * 'crop' defaults to false when not provided. |
| | 250 | * |
| 248 | 251 | * @since 3.5.0 |
| 249 | 252 | * @access public |
| 250 | 253 | * |
| 251 | | * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... } |
| | 254 | * @param array $sizes { {'width'=>int, 'height'=>int, ['crop'=>bool]}, ... } |
| 252 | 255 | * @return array |
| 253 | 256 | */ |
| 254 | 257 | public function multi_resize( $sizes ) { |
| … |
… |
class WP_Image_Editor_Imagick extends WP_Image_Editor { |
| 260 | 263 | if ( ! $this->image ) |
| 261 | 264 | $this->image = $orig_image->getImage(); |
| 262 | 265 | |
| | 266 | if ( ! ( isset( $size_data['width'] ) && isset( $size_data['height'] ) ) ) |
| | 267 | continue; |
| | 268 | |
| | 269 | if ( ! isset( $size_data['crop'] ) ) |
| | 270 | $size_data['crop'] = false; |
| | 271 | |
| 263 | 272 | $resize_result = $this->resize( $size_data['width'], $size_data['height'], $size_data['crop'] ); |
| 264 | 273 | |
| 265 | 274 | if( ! is_wp_error( $resize_result ) ) { |
diff --git wp-includes/class-wp-image-editor.php wp-includes/class-wp-image-editor.php
index 1125602..1d7b80e 100644
|
|
|
abstract class WP_Image_Editor { |
| 97 | 97 | * Processes current image and saves to disk |
| 98 | 98 | * multiple sizes from single source. |
| 99 | 99 | * |
| | 100 | * 'width' and 'height' are required. |
| | 101 | * 'crop' defaults to false when not provided. |
| | 102 | * |
| 100 | 103 | * @since 3.5.0 |
| 101 | 104 | * @access public |
| 102 | 105 | * @abstract |
| 103 | 106 | * |
| 104 | | * @param array $sizes { {'width'=>int, 'height'=>int, 'crop'=>bool}, ... } |
| | 107 | * @param array $sizes { {'width'=>int, 'height'=>int, ['crop'=>bool]}, ... } |
| 105 | 108 | * @return array |
| 106 | 109 | */ |
| 107 | 110 | abstract public function multi_resize( $sizes ); |