wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_prevent_unsupported_mime_type_uploads › Filtr WordPress Hooks

Od6.8.0
Przestarzałyn/a
› apply_filters( 'wp_prevent_unsupported_mime_type_uploads', true, $files['file']['type'] ?? null )
Parametry: (2)
  • () check_mime Whether to prevent uploads of unsupported image types.
    Wymagane: Tak
  • () mime_type The mime type of the file being uploaded (if available).
    Wymagane: Tak
Zdefiniowane na:
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.




Źródło

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