Make WordPress Core

Changeset 59346


Ignore:
Timestamp:
11/05/2024 04:07:45 AM (less than one hour ago)
Author:
azaozz
Message:

Media: Better variable name and some docs fixes for the new wp_get_image_editor_output_format().

Props peterwilsoncc, apermo, azaozz.
See #62305.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r59317 r59346  
    62346234 */
    62356235function wp_get_image_editor_output_format( $filename, $mime_type ) {
    6236     $default_output_format = array(
     6236    $output_format = array(
    62376237        'image/heic'          => 'image/jpeg',
    62386238        'image/heif'          => 'image/jpeg',
     
    62506250     *
    62516251     * @since 5.8.0
    6252      * @since 6.7.0 The default was changed from empty array to array containing the HEIC mime types.
     6252     * @since 6.7.0 The default was changed from an empty array to an array
     6253     *              containing the HEIC/HEIF images mime types.
    62536254     *
    62546255     * @param string[] $output_format {
    62556256     *     An array of mime type mappings. Maps a source mime type to a new
    6256      *     destination mime type. Default maps uploaded HEIC images to JPEG output.
     6257     *     destination mime type. By default maps HEIC/HEIF input to JPEG output.
    62576258     *
    62586259     *     @type string ...$0 The new mime type.
     
    62616262     * @param string $mime_type The source image mime type.
    62626263     */
    6263     return apply_filters( 'image_editor_output_format', $default_output_format, $filename, $mime_type );
    6264 }
     6264    return apply_filters( 'image_editor_output_format', $output_format, $filename, $mime_type );
     6265}
Note: See TracChangeset for help on using the changeset viewer.