Changeset 51227
- Timestamp:
- 06/24/2021 07:10:32 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/vendor/plupload/handlers.js
r51030 r51227 605 605 if ( file.type === 'image/heic' && up.settings.heic_upload_error ) { 606 606 // Show error but do not block uploading. 607 wpQueueError( pluploadL10n.unsupported_image ) 607 wpQueueError( pluploadL10n.unsupported_image ); 608 } else if ( file.type === 'image/webp' && up.settings.webp_upload_error ) { 609 // Disallow uploading of WebP images if the server cannot edit them. 610 wpQueueError( pluploadL10n.noneditable_image ); 611 up.removeFile( file ); 612 return; 608 613 } 609 614 -
trunk/src/js/_enqueues/vendor/plupload/wp-plupload.js
r50001 r51227 359 359 file: file 360 360 }); 361 } else if ( file.type === 'image/webp' && up.settings.webp_upload_error ) { 362 // Disallow uploading of WebP images if the server cannot edit them. 363 error( pluploadL10n.noneditable_image, {}, file, 'no-retry' ); 364 up.removeFile( file ); 365 return; 361 366 } 362 367 -
trunk/src/wp-admin/includes/media.php
r50810 r51227 2199 2199 } 2200 2200 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 2201 2206 /** 2202 2207 * Filters the default Plupload settings. -
trunk/src/wp-includes/media.php
r51221 r51227 3859 3859 } 3860 3860 3861 // Check if WebP images can be edited. 3862 if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) { 3863 $defaults['webp_upload_error'] = true; 3864 } 3865 3861 3866 /** 3862 3867 * Filters the Plupload default settings. -
trunk/src/wp-includes/script-loader.php
r51223 r51227 876 876 'error_uploading' => __( '“%s” has failed to upload.' ), 877 877 'unsupported_image' => __( 'This image cannot be displayed in a web browser. For best results convert it to JPEG before uploading.' ), 878 'noneditable_image' => __( 'This image cannot be processed by the web server. Convert it to JPEG or PNG before uploading.' ), 878 879 'file_url_copied' => __( 'The file URL has been copied to your clipboard' ), 879 880 );
Note: See TracChangeset
for help on using the changeset viewer.