Make WordPress Core


Ignore:
Timestamp:
09/07/2022 03:39:28 PM (2 years ago)
Author:
flixos90
Message:

Media: Move wp_default_image_output_mapping() filter callback to frontend scope.

While the image_editor_output_format filter is primarily used in WP Admin, it can also be executed in frontend scope, as the related WP_Image_Editor class and wp_unique_filename() function are being loaded in that scope.

Follow up to [54086].

See #55443, #56526.

File:
1 edited

Legend:

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

    r53846 r54094  
    633633add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );
    634634
     635add_filter( 'image_editor_output_format', 'wp_default_image_output_mapping' );
     636
    635637// Embeds.
    636638add_action( 'rest_api_init', 'wp_oembed_register_route' );
Note: See TracChangeset for help on using the changeset viewer.