wp-includes/functions.php:3000Retrieves the file type based on the extension name.
$extstringstring|voidfunction wp_ext2type( $ext ) { $ext = strtolower( $ext ); $ext2type = wp_get_ext_types(); foreach ( $ext2type as $type => $exts ) { if ( in_array( $ext, $exts, true ) ) { return $type; } }}Introduced in 2.5.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
string|void to string|null.verified against sourcesrc/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.