Filters the “real” file type of the given file.
Parameters
$wp_check_filetype_and_ext
array- Values for the extension, mime type, and corrected filename.
ext
string|falseFile extension, or false if the file doesn’t match a mime type.type
string|falseFile mime type, or false if the file doesn’t match a mime type.proper_filename
string|falseFile name with its correct extension, or false if it cannot be determined.
$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
string[]|null- Array of mime types keyed by their file extension regex, or null if none were provided.
$real_mime
string|false- The actual mime type or false if the type cannot be determined.
Source
return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime );
User Contributed Notes
You must log in before being able to contribute a note or feedback.