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).


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More