sanitize_mime_type
Filters a mime type following sanitization.
Использование
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(строка)
- The sanitized mime type.
- $mime_type(строка)
- The mime type prior to sanitization.
Список изменений
С версии 3.1.3 | Введена. |
Где вызывается хук
sanitize_mime_type
wp-includes/formatting.php 5718
return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type );