Advertisements

sanitize_mime_type

Definition:
function sanitize_mime_type( $mime_type ) {}

Sanitize a mime type

Parameters

  • string $mime_type: Mime type

Return values

returns:Sanitized mime type

Defined filters

  • sanitize_mime_type
    apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type )

Source code

function sanitize_mime_type( $mime_type ) {

	$sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );

	return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );

}

14535

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: