function theme_filefield in FileField 5.2
Same name and namespace in other branches
- 5 filefield.module \theme_filefield()
- 6.2 filefield.formatter.inc \theme_filefield()
2 theme calls to theme_filefield()
File
- ./
filefield.module, line 795 - Defines a file field type.
Code
function theme_filefield($file) {
if (user_access('view filefield uploads') && is_file($file['filepath']) && $file['list']) {
$path = $file['fid'] == 'upload' ? file_create_filename($file['filename'], file_create_path($field['widget']['file_path'])) : $file['filepath'];
$icon = theme('filefield_icon', $file);
$url = file_create_url($path);
$desc = $file['description'];
return '<div class="filefield-item clear-block">' . $icon . l($desc, $url) . '</div>';
}
return '';
}