Media: Better variable name and some docs fixes for the new `wp_get_image_editor_output_format()`.
Props peterwilsoncc, apermo, azaozz. See #62305. Built from https://develop.svn.wordpress.org/trunk@59346 git-svn-id: http://core.svn.wordpress.org/trunk@58732 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e81661e92d
commit
310a481b66
|
@ -6233,7 +6233,7 @@ function wp_high_priority_element_flag( $value = null ) {
|
||||||
* @return string[] An array of mime type mappings.
|
* @return string[] An array of mime type mappings.
|
||||||
*/
|
*/
|
||||||
function wp_get_image_editor_output_format( $filename, $mime_type ) {
|
function wp_get_image_editor_output_format( $filename, $mime_type ) {
|
||||||
$default_output_format = array(
|
$output_format = array(
|
||||||
'image/heic' => 'image/jpeg',
|
'image/heic' => 'image/jpeg',
|
||||||
'image/heif' => 'image/jpeg',
|
'image/heif' => 'image/jpeg',
|
||||||
'image/heic-sequence' => 'image/jpeg',
|
'image/heic-sequence' => 'image/jpeg',
|
||||||
|
@ -6249,16 +6249,17 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) {
|
||||||
* @see WP_Image_Editor::get_output_format()
|
* @see WP_Image_Editor::get_output_format()
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
* @since 6.7.0 The default was changed from empty array to array containing the HEIC mime types.
|
* @since 6.7.0 The default was changed from an empty array to an array
|
||||||
|
* containing the HEIC/HEIF images mime types.
|
||||||
*
|
*
|
||||||
* @param string[] $output_format {
|
* @param string[] $output_format {
|
||||||
* An array of mime type mappings. Maps a source mime type to a new
|
* An array of mime type mappings. Maps a source mime type to a new
|
||||||
* destination mime type. Default maps uploaded HEIC images to JPEG output.
|
* destination mime type. By default maps HEIC/HEIF input to JPEG output.
|
||||||
*
|
*
|
||||||
* @type string ...$0 The new mime type.
|
* @type string ...$0 The new mime type.
|
||||||
* }
|
* }
|
||||||
* @param string $filename Path to the image.
|
* @param string $filename Path to the image.
|
||||||
* @param string $mime_type The source image mime type.
|
* @param string $mime_type The source image mime type.
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'image_editor_output_format', $default_output_format, $filename, $mime_type );
|
return apply_filters( 'image_editor_output_format', $output_format, $filename, $mime_type );
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.8-alpha-59344';
|
$wp_version = '6.8-alpha-59346';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue