wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_prevent_unsupported_mime_type_uploads › WordPress Filter Hooks

Seit6.8.0
Veraltetn/v
apply_filters( 'wp_prevent_unsupported_mime_type_uploads', true, isset( $files['file']['type'] )
Parameter: (2)
  • (bool) $check_mime Whether to prevent uploads of unsupported image types.
    Erforderlich: Ja
  • (string|null) $mime_type The mime type of the file being uploaded (if available).
    Erforderlich: Ja
Definiert in:
Codex:

Filter whether the server should prevent uploads for image types it doesn't support. Default true.

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.





Ähnliche Hooks: wp_create_file_in_uploads

Quellcode

$prevent_unsupported_uploads = apply_filters( 'wp_prevent_unsupported_mime_type_uploads', true, isset( $files['file']['type'] ) ? $files['file']['type'] : null );