Ticket #23325: image.php.patch
File image.php.patch, 918 bytes (added by , 12 years ago) |
---|
-
image.php
20 20 * @param int $dst_h The destination height. 21 21 * @param int $src_abs Optional. If the source crop points are absolute. 22 22 * @param string $dst_file Optional. The destination file to write to. 23 * @return string|WP_Error |false New filepath on success, WP_Error or falseon failure.23 * @return string|WP_Error New filepath on success, WP_Error on failure. 24 24 */ 25 25 function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { 26 26 $src_file = $src; … … 54 54 $dst_file = dirname( $dst_file ) . '/' . wp_unique_filename( dirname( $dst_file ), basename( $dst_file ) ); 55 55 56 56 $result = $editor->save( $dst_file ); 57 if ( is_wp_error( $result ) ) 58 return $result; 59 57 60 return $dst_file; 58 61 } 59 62