Changeset 60084 for trunk/src/wp-admin/includes/media.php
- Timestamp:
- 03/25/2025 02:04:47 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r59767 r60084 2195 2195 } 2196 2196 2197 // Check if WebP images can be edited. 2198 if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) { 2199 $plupload_init['webp_upload_error'] = true; 2200 } 2201 2202 // Check if AVIF images can be edited. 2203 if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/avif' ) ) ) { 2204 $plupload_init['avif_upload_error'] = true; 2197 /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */ 2198 $prevent_unsupported_uploads = apply_filters( 'wp_prevent_unsupported_mime_type_uploads', true, null ); 2199 2200 if ( $prevent_unsupported_uploads ) { 2201 // Check if WebP images can be edited. 2202 if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) { 2203 $plupload_init['webp_upload_error'] = true; 2204 } 2205 2206 // Check if AVIF images can be edited. 2207 if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/avif' ) ) ) { 2208 $plupload_init['avif_upload_error'] = true; 2209 } 2205 2210 } 2206 2211
Note: See TracChangeset
for help on using the changeset viewer.