sanitize_mime_type
Filters a mime type following sanitization.
Usage
add_filter( 'sanitize_mime_type', 'wp_kama_sanitize_mime_type_filter', 10, 2 );
/**
* Function for `sanitize_mime_type` filter-hook.
*
* @param string $sani_mime_type The sanitized mime type.
* @param string $mime_type The mime type prior to sanitization.
*
* @return string
*/
function wp_kama_sanitize_mime_type_filter( $sani_mime_type, $mime_type ){
// filter...
return $sani_mime_type;
}
- $sani_mime_type(string)
- The sanitized mime type.
- $mime_type(string)
- The mime type prior to sanitization.
Changelog
| Since 3.1.3 | Introduced. |
Where the hook is called
sanitize_mime_type
wp-includes/formatting.php 5744
return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );