upload_mimes WordPress Filter Hook
This hook allows you to add extra mime types to WordPress. This is useful if you want to add support for a new file type to WordPress.
apply_filters( 'upload_mimes', array $t , int|WP_User|null $user ) #
Filters list of allowed mime types and file extensions.
Parameters
- $t
(array)Mime types keyed by the file extension regex corresponding to those types.
- $user
(int|WP_User|null)User ID, User object or null if not provided (indicates current user).
Source
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |