apply_filters( 'wp_check_filetype_and_ext', array $wp_check_filetype_and_ext, string $file, string $filename, array $mimes, string|bool $real_mime )

Filters the “real” file type of the given file.


Parameters

$wp_check_filetype_and_ext

(array) File data array containing 'ext', 'type', and 'proper_filename' keys.

$file

(string) Full path to the file.

$filename

(string) The name of the file (may differ from $file due to $file being in a tmp directory).

$mimes

(array) Key is the file extension with value as the mime type.

$real_mime

(string|bool) The actual mime type or false if the type cannot be determined.


Source

File: wp-includes/functions.php

View on GitHub



Changelog

Changelog
Version Description
WP-5.1.0 The $real_mime parameter was added.
WP-3.0.0 Introduced.