function theme_file_icon_itu in iTweak Upload 7.3
Returns HTML for an image with an appropriate icon for the given file.
Parameters
$variables: An associative array containing:
- file: A file object for which to make an icon.
- icon_directory: (optional) A path to a directory of icons to be used for files. Defaults to the value of the "file_icon_directory" variable.
2 theme calls to theme_file_icon_itu()
- theme_file_formatter_table_itu in ./
itweak_upload.module - Returns HTML for a file attachments table.
- theme_file_link_itu in ./
itweak_upload.module - Returns HTML for a link to a file.
File
- ./
itweak_upload.module, line 621 - iTweakUpload - Tweak attachments display and file upload forms.
Code
function theme_file_icon_itu($variables) {
$file = $variables['file'];
$icon_directory = empty($variables['icon_directory']) ? NULL : $variables['icon_directory'];
$mime = check_plain($file->filemime);
$icon_url = itweak_upload_file_icon_url($file, $icon_directory);
return '<img class="file-icon" alt="" title="' . $mime . '" src="' . $icon_url . '" />';
}