Ticket #20657: 20657.patch
File 20657.patch, 724 bytes (added by , 13 years ago) |
---|
-
wp-admin/includes/image.php
44 44 * @return string|WP_Error|false New filepath on success, WP_Error or false on failure. 45 45 */ 46 46 function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { 47 if ( 0 == $src_x && 0 == $src_y && $src_w == $dst_w && $src_h == $dst_h )48 return ( is_numeric( $src ) ) ? get_attached_file( $src ) : $src;49 50 47 if ( is_numeric( $src ) ) { // Handle int as attachment ID 51 48 $src_file = get_attached_file( $src ); 52 49 if ( ! file_exists( $src_file ) ) {