Filter whether the server should prevent uploads for image types it doesn’t support. Default true.
Description
Developers can use this filter to enable uploads of certain image types. By default image types that are not supported by the server are prevented from being uploaded.
Parameters
$check_mime
bool- Whether to prevent uploads of unsupported image types.
$mime_type
string|null- The mime type of the file being uploaded (if available).
Source
$prevent_unsupported_uploads = apply_filters( 'wp_prevent_unsupported_mime_type_uploads', true, isset( $files['file']['type'] ) ? $files['file']['type'] : null );
Changelog
Version | Description |
---|---|
6.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.