Ticket #21959: media_destination_file_name_hook.diff
File media_destination_file_name_hook.diff, 707 bytes (added by , 12 years ago) |
---|
-
wp-includes/media.php
453 453 if ( !is_null($dest_path) and $_dest_path = realpath($dest_path) ) 454 454 $dir = $_dest_path; 455 455 $destfilename = "{$dir}/{$name}-{$suffix}.{$ext}"; 456 456 457 $destfilename = apply_filters('image_resize_set_file_name', array( 458 'proposed_file_path' => $destfilename, 459 'suffix' => $suffix, 460 'extension' => $ext, 461 'original' => $file 462 )); 463 457 464 if ( IMAGETYPE_GIF == $orig_type ) { 458 465 if ( !imagegif( $newimage, $destfilename ) ) 459 466 return new WP_Error('resize_path_invalid', __( 'Resize path invalid' ));