'; } if (filefield_file_listed($file, $field)) { return theme('filefield_file', $file); } return ''; } /** * return whether a file is set to listed taking into consideration * widget default value settings. * * @param $file a populated filefield item. * @param $field a cck field instance array. */ function filefield_file_listed($file, $field) { if ($field['force_list_default']) return (bool)$field['list_default']; return (bool)$file['list']; } /** * Theme function for the 'generic' single file formatter. */ function theme_filefield_file($file) { $path = $file['filepath']; $url = file_create_url($path); $icon = theme('filefield_icon', $file); return '
'. $icon . l($file['filename'], $url) .'
'; }