WordPress.org

Make WordPress Core

Ticket #18835: media.diff

File media.diff, 703 bytes (added by scottconnerly, 3 years ago)

now using copact( ), good call.

  • wp-includes/media.php

     
    381381 
    382382        // the return array matches the parameters to imagecopyresampled() 
    383383        // int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h 
    384         return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h ); 
     384        $return = array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h ); 
     385        return apply_filters('image_resize_dimensions', $return, compact('orig_w', 'orig_h', 'dest_w', 'dest_h', 'crop')); 
    385386 
    386387} 
    387388