function theme_commerce_file_file_link_plain in Commerce File 7
Returns HTML for a plain text display of a file.
Parameters
$variables: An associative array containing:
- file: A file object to which the link will be created.
- 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.
1 theme call to theme_commerce_file_file_link_plain()
- theme_commerce_file_file_formatter_table_plain in ./
commerce_file.module - Returns HTML for a file table with no links to the files.
File
- ./
commerce_file.module, line 1177 - Provides integration of file licenses with Commerce
Code
function theme_commerce_file_file_link_plain($variables) {
$file = $variables['file'];
$icon_directory = $variables['icon_directory'];
$icon = theme('file_icon', array(
'file' => $file,
'icon_directory' => $icon_directory,
));
// Use the description as the link text if available.
if (empty($file->description)) {
$link_text = $file->filename;
}
else {
$link_text = $file->description;
}
return '<span class="file">' . $icon . ' ' . check_plain($link_text) . '</span>';
}