wp_check_filetype


wp_check_filetype ( $filename, $mimes = null )

Parameters:
  • (string) filename File name or path.
  • (string[]) mimes Optional. Array of mime types keyed by their file extension regex.
Returns:
  • (array) { Values for the extension and mime type. @type string|false $ext File extension, or false if the file doesn't match a mime type. @type string|false $type File mime type, or false if the file doesn't match a mime type. }
Defined at:

Description

Retrieve the file type from the file name.You can optionally define the mime array, if needed.

Related Functions

wp_check_filetype_and_ext, wp_cache_delete, wp_checkdate, wp_match_mime_types, wp_get_mime_types

Top Google Results

User discussions

wpseek mobile