Changeset 46459 for trunk/src/wp-admin/includes/image.php
- Timestamp:
- 10/11/2019 07:52:12 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r46421 r46459 582 582 // Resize based on the full size image, rather than the source. 583 583 if ( ! is_wp_error( $uploaded ) ) { 584 $ editor = wp_get_image_editor( $uploaded['path'] );584 $image_file = $uploaded['path']; 585 585 unset( $uploaded['path'] ); 586 586 587 if ( ! is_wp_error( $editor ) ) { 588 $metadata['sizes'] = $editor->multi_resize( $merged_sizes ); 589 $metadata['sizes']['full'] = $uploaded; 590 } 587 $metadata['sizes'] = array( 588 'full' => $uploaded, 589 ); 590 591 // Save the meta data before any image post-processing errors could happen. 592 wp_update_attachment_metadata( $attachment_id, $metadata ); 593 594 // Create sub-sizes saving the image meta after each. 595 $metadata = _wp_make_subsizes( $merged_sizes, $image_file, $metadata, $attachment_id ); 591 596 } 592 597 }
Note: See TracChangeset
for help on using the changeset viewer.