WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp mime type icon

Description

Retrieve the icon for a MIME type.

Usage

<?php wp_mime_type_icon$mime ?>

Parameters

$mime
(string) (optional) MIME type
Default: 0

Return Values

(string|boolean) 
Returns a value from The filtered value after all hooked functions are applied to it.

Examples

Display the icon image of the video format

<?php
$img = wp_mime_type_icon('video/mp4');
?>
<img src="<?php echo $img ?>" />

Notes

  • Uses: apply_filters calls 'wp_mime_type_icon' on $icon, $mime and $post_id

Change Log

Since: 2.1.0

Source File

wp_mime_type_icon() is located in wp-includes/post.php.

Related

See also index of Function Reference and index of Template Tags.