Changeset 54226 for trunk/src/wp-includes/class-wp-image-editor-gd.php
- Timestamp:
- 09/19/2022 10:51:53 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-image-editor-gd.php
r54210 r54226 228 228 * 229 229 * @param array $sizes { 230 * A ssociative array of image size names and their data.230 * An array of image size data arrays. 231 231 * 232 232 * Either a height or width must be provided. … … 248 248 249 249 foreach ( $sizes as $size => $size_data ) { 250 // Include size name in the data.251 $size_data['name'] = $size;252 253 250 $meta = $this->make_subsize( $size_data ); 254 251 … … 265 262 * 266 263 * @since 5.3.0 267 * @since 6.1.0 The $sizes parameter may now include a $name key for each entry.268 264 * 269 265 * @param array $size_data { 270 266 * Array of size data. 271 267 * 272 * @type int $width The maximum width in pixels. 273 * @type int $height The maximum height in pixels. 274 * @type bool $crop Whether to crop the image to exact dimensions. 275 * @type string $name Image size name. 268 * @type int $width The maximum width in pixels. 269 * @type int $height The maximum height in pixels. 270 * @type bool $crop Whether to crop the image to exact dimensions. 276 271 * } 277 272 * @return array|WP_Error The image data array for inclusion in the `sizes` array in the image meta, … … 283 278 } 284 279 285 $orig_size = $this->size; 286 $orig_size_name = $this->size_name; 280 $orig_size = $this->size; 287 281 288 282 if ( ! isset( $size_data['width'] ) ) { … … 296 290 if ( ! isset( $size_data['crop'] ) ) { 297 291 $size_data['crop'] = false; 298 }299 300 if ( isset( $size_data['name'] ) ) {301 $this->update_size_name( $size_data['name'] );302 292 } 303 293 … … 311 301 } 312 302 313 $this->size = $orig_size; 314 $this->size_name = $orig_size_name; 303 $this->size = $orig_size; 315 304 316 305 if ( ! is_wp_error( $saved ) ) {
Note: See TracChangeset
for help on using the changeset viewer.