wp_is_heic_image_mime_type()WP 6.7.0

Checks if a mime type is for a HEIC/HEIF image.

Хуков нет.

Возвращает

true|false. Whether the mime type is for a HEIC/HEIF image.

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

wp_is_heic_image_mime_type( $mime_type );
$mime_type(строка) (обязательный)
The mime type to check.

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

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

Код wp_is_heic_image_mime_type() WP 6.7.1

function wp_is_heic_image_mime_type( $mime_type ) {
	$heic_mime_types = array(
		'image/heic',
		'image/heif',
		'image/heic-sequence',
		'image/heif-sequence',
	);

	return in_array( $mime_type, $heic_mime_types, true );
}