Core Function
View Source on Trac ↗ wp_check_filetype()
wp_check_filetype( mixed $filename, mixed $mimes = null ) Retrieves the file type from the file name.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $filename string | File name or path. Required |
| mixed | (string[] | null) $mimes Optional. Array of allowed mime types keyed by their file extension regex. Defaults to the result of get_allowed_mime_types(). Required |
Return Value
(array)
array {
Values for the extension and mime type.
Function Information
Since Version
2.0.4
Source File
wp-includes/functions.php
Advertisement