WordPress at a glance
function is not described

wp_ext2type() WP 2.5.0

Retrieve the file type based on the extension name.

No Hooks.

Return

String/null. The file type, example: audio, video, document, spreadsheet, etc.

Usage

wp_ext2type( $ext );
$ext(string) (required)
The extension to search.

Code of wp ext2type: wp-includes/functions.php VER 5.1.1

<?php
function wp_ext2type( $ext ) {
	$ext = strtolower( $ext );

	$ext2type = wp_get_ext_types();
	foreach ( $ext2type as $type => $exts ) {
		if ( in_array( $ext, $exts ) ) {
			return $type;
		}
	}
}