Changeset 12524 for trunk/wp-admin/includes/image.php
- Timestamp:
- 12/23/2009 06:39:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image.php
r12351 r12524 39 39 * @param int $src_abs Optional. If the source crop points are absolute. 40 40 * @param string $dst_file Optional. The destination file to write to. 41 * @return string New filepath on success, String error message on failure.41 * @return string|WP_Error|false New filepath on success, WP_Error or false on failure. 42 42 */ 43 43 function wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) { … … 47 47 $src = wp_load_image( $src_file ); 48 48 49 if ( !is_resource( $src ) )50 return $src;49 if ( !is_resource( $src ) ) 50 return new WP_Error( 'error_loading_image', $src, $src_file ); 51 51 52 52 $dst = wp_imagecreatetruecolor( $dst_w, $dst_h );
Note: See TracChangeset
for help on using the changeset viewer.