wp_mime_type_icon
Filters the mime type icon.
Использование
add_filter( 'wp_mime_type_icon', 'wp_kama_mime_type_icon_filter', 10, 3 );
/**
* Function for `wp_mime_type_icon` filter-hook.
*
* @param string $icon Path to the mime type icon.
* @param string $mime Mime type.
* @param int $post_id Attachment ID. Will equal 0 if the function passed the mime type.
*
* @return string
*/
function wp_kama_mime_type_icon_filter( $icon, $mime, $post_id ){
// filter...
return $icon;
}
- $icon(строка)
- Path to the mime type icon.
- $mime(строка)
- Mime type.
- $post_id(int)
- Attachment ID. Will equal 0 if the function passed the mime type.
Список изменений
| С версии 2.1.0 | Введена. |
Где вызывается хук
wp-includes/post.php 7324
return apply_filters( 'wp_mime_type_icon', $icon, $mime, $post_id );