A WordPress-centric search engine for devs and theme authors

wp_check_filetype_and_ext ›

apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' )
Parameters: (5)
  • (array) $wp_check_filetype_and_ext File data array containing 'ext', 'type', and 'proper_filename' keys.
    Required: Yes
  • (string) $file Full path to the file.
    Required: Yes
  • (string) $filename The name of the file (may differ from $file due to $file being in a tmp directory).
    Required: Yes
  • (array) $mimes Key is the file extension with value as the mime type.
    Required: Yes
  • (string|bool) $real_mime The actual mime type or false if the type cannot be determined.
    Required: Yes
Defined at:

Filters the "real" file type of the given file.


return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime );