wp_mime_type_icon WordPress Filter Hook

The wp_mime_type_icon hook allows you to add an icon for a specific mime type. This can be useful for displaying different icons for different file types in your Wordpress site.

apply_filters( 'wp_mime_type_icon', string $icon, string $mime, int $post_id ) #

Filters the mime type icon.


Parameters

$icon

(string)Path to the mime type icon.

$mime

(string)Mime type.

$post_id

(int)Attachment ID. Will equal 0 if the function passed the mime type.


Top ↑

Source

File: wp-includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More