Codex tools: Log in
Check an array of MIME types against a whitelist. All types not on the whitelist are filtered out, and only the allowed types are returned.
WordPress ships with a set of allowed upload file types, which is defined in
wp-includes/functions.php in get_allowed_mime_types(). This function is used to filter that list against the filetype whitelist provided by Multisite Super Admins at wp-admin/network/settings.php.
<?php check_upload_mimes( $mimes ) ?>
<?php $mimes = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'php' => 'application/x-php', // This isn't on the whitelist! ); $mimes = check_upload_mimes( $mimes ); // array( 'jpg|jpeg|jpe' => 'image/jpeg' ); ?>
check_upload_mimes() is located in