mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +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:
@@ -3858,6 +3858,11 @@ function wp_plupload_default_settings() {
|
||||
$defaults['multi_selection'] = false;
|
||||
}
|
||||
|
||||
// Check if WebP images can be edited.
|
||||
if ( ! wp_image_editor_supports( array( 'mime_type' => 'image/webp' ) ) ) {
|
||||
$defaults['webp_upload_error'] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the Plupload default settings.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user