mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Media: Ensure wp_crop_image()
returns correct file type.
Return the correct file path from `wp_crop_image()` when a developer modifies the file type with via the `image_editor_output_format` filter. Previously the function would return a broken file reference containing the original file extension rather than the one specified via the filter. Props mat-lipe, adamsilverstein. Fixes #55403. Built from https://develop.svn.wordpress.org/trunk@53292 git-svn-id: http://core.svn.wordpress.org/trunk@52881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
75d1fab217
commit
da0ce4038f
@ -63,6 +63,10 @@ function wp_crop_image( $src, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $s
|
||||
return $result;
|
||||
}
|
||||
|
||||
if ( ! empty( $result['path'] ) ) {
|
||||
return $result['path'];
|
||||
}
|
||||
|
||||
return $dst_file;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-beta3-53291';
|
||||
$wp_version = '6.0-beta3-53292';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user