W3cubDocs

/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

File: wp-includes/functions.php

View on Trac

Changelog

Version Description
2.0.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/upload_mimes