WordPress\AiClient\Files\DTO

File::isMimeType │ public │ WP 0.1.0

Checks if the file is a specific MIME type.

Метод класса: File{}

Хуков нет.

Возвращает

bool. True if the file is of the specified type.

Использование

$File = new File();
$File->isMimeType( $type ): bool;
$type(строка) (обязательный)
The mime type to check (e.g. 'image', 'text', 'video', 'audio').

Список изменений

С версии 0.1.0 Введена.

Код File::isMimeType() WP 7.1.4

public function isMimeType(string $type): bool
{
    return $this->mimeType->isType($type);
}