apply_filters( 'wp_check_filetype_and_ext', array $wp_check_filetype_and_ext , string $file , string $filename , string[] $mimes , string|false $real_mime )
Filters the “real” file type of the given file.
Parameters
- $wp_check_filetype_and_ext
-
Values for the extension, mime type, and corrected filename.<br>
- 'ext'
(string|false) File extension, or false if the file doesn't match a mime type.<br> - 'type'
(string|false) File mime type, or false if the file doesn't match a mime type.<br> - 'proper_filename'
(string|false) File name with its correct extension, or false if it cannot be determined.<br>
- 'ext'
- $file
-
Full path to the file.
- $filename
-
The name of the file (may differ from $file due to $file being in a tmp directory).
- $mimes
-
Array of mime types keyed by their file extension regex.
- $real_mime
-
The actual mime type or false if the type cannot be determined.
Source
Changelog
Version | Description |
---|---|
5.1.0 | The $real_mime parameter was added. |
3.0.0 | Introduced. |