mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Media: Prevent uploading and show an error message when the server doesn't support editing of WebP images, take II. Add new, better error message for it.
Props antpb, joedolson, iandunn, azaozz. Fixes #53475. git-svn-id: https://develop.svn.wordpress.org/trunk@51227 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2198,6 +2198,11 @@ function media_upload_form( $errors = null ) {
|
||||
$plupload_init['multi_selection'] = false;
|
||||
}
|
||||
|
||||
// Check if WebP images can be edited.
|
||||
if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
|
||||
$plupload_init['webp_upload_error'] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the default Plupload settings.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user