wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_is_heic_image_mime_type › WordPress Function

Seit6.7.0
Veraltetn/v
wp_is_heic_image_mime_type ( $mime_type )
Parameter:
  • (string) $mime_type The mime type to check.
    Erforderlich: Ja
Gibt zurück:
  • (bool) Whether the mime type is for a HEIC/HEIF image.
Definiert in:
Codex:

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



Quellcode

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 );
}