WordPress\AiClient\Files\DTO
File::isMimeType
Checks if the file is a specific MIME type.
Method of the class: File{}
No Hooks.
Returns
true|false. True if the file is of the specified type.
Usage
$File = new File(); $File->isMimeType( $type ): bool;
- $type(string) (required)
- The mime type to check (e.g.
'image','text','video', 'audio').
Changelog
| Since 0.1.0 | Introduced. |
File::isMimeType() File::isMimeType code WP 7.0
public function isMimeType(string $type): bool
{
return $this->mimeType->isType($type);
}