function theme_filefield_icon in FileField 5.2
Same name and namespace in other branches
- 5 filefield.module \theme_filefield_icon()
- 6.3 filefield.theme.inc \theme_filefield_icon()
- 6.2 filefield.theme.inc \theme_filefield_icon()
2 theme calls to theme_filefield_icon()
File
- ./
filefield.module, line 780 - Defines a file field type.
Code
function theme_filefield_icon($file) {
$mime = check_plain($file['filemime']);
$dashed_mime = strtr($mime, array(
'/' => '-',
));
if ($icon_url = filefield_icon_url($file)) {
$icon = '<img class="field-icon-' . $dashed_mime . '" alt="' . $mime . ' icon" src="' . $icon_url . '" />';
}
return '<div class="filefield-icon field-icon-' . $dashed_mime . '">' . $icon . '</div>';
}