Changeset 27522
- Timestamp:
- 03/13/2014 04:17:36 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image-edit.php
r27357 r27522 637 637 */ 638 638 function wp_save_image( $post_id ) { 639 global $_wp_additional_image_sizes; 640 639 641 $return = new stdClass; 640 642 $success = $delete = $scaled = $nocrop = false; … … 771 773 } 772 774 773 $crop = $nocrop ? false : get_option("{$size}_crop"); 774 $_sizes[ $size ] = array( 'width' => get_option("{$size}_size_w"), 'height' => get_option("{$size}_size_h"), 'crop' => $crop ); 775 if ( isset( $_wp_additional_image_sizes[ $size ] ) ) { 776 $width = intval( $_wp_additional_image_sizes[ $size ]['width'] ); 777 $height = intval( $_wp_additional_image_sizes[ $size ]['height'] ); 778 $crop = ( $nocrop ) ? false : intval( $_wp_additional_image_sizes[ $size ]['crop'] ); 779 } else { 780 $height = get_option( "{$size}_size_h" ); 781 $width = get_option( "{$size}_size_w" ); 782 $crop = ( $nocrop ) ? false : get_option( "{$size}_crop" ); 783 } 784 785 $_sizes[ $size ] = array( 'width' => $width, 'height' => $height, 'crop' => $crop ); 775 786 } 776 787
Note: See TracChangeset
for help on using the changeset viewer.