WordPress at a glance
function is not described

sanitize_mime_type() WP 3.1.3

Sanitize a mime type

Hooks in function
Return

String. Sanitized mime type

Usage

sanitize_mime_type( $mime_type );
$mime_type(string) (required)
Mime type

Code of sanitize mime type: wp-includes/formatting.php WP 5.2.2

<?php
function sanitize_mime_type( $mime_type ) {
	$sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
	/**
	 * Filters a mime type following sanitization.
	 *
	 * @since 3.1.3
	 *
	 * @param string $sani_mime_type The sanitized mime type.
	 * @param string $mime_type      The mime type prior to sanitization.
	 */
	return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );
}