wp_check_filetype


wp_check_filetype ( $filename, $mimes = null )

Parameters:
  • (string) filename File name or path.
  • (string[]|null) mimes Optional. Array of allowed mime types keyed by their file extension regex. Defaults to the result of get_allowed_mime_types().
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

Retrieves 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