function theme_uc_file_downloads_token in Ubercart 7.3
Same name and namespace in other branches
- 8.4 uc_file/uc_file.tokens.inc \theme_uc_file_downloads_token()
- 5 uc_file/uc_file.module \theme_uc_file_downloads_token()
- 6.2 uc_file/uc_file.module \theme_uc_file_downloads_token()
Themes the file download links token.
1 theme call to theme_uc_file_downloads_token()
- uc_file_tokens in uc_file/
uc_file.tokens.inc - Implements hook_tokens().
File
- uc_file/
uc_file.tokens.inc, line 57 - Token hooks for the uc_file module.
Code
function theme_uc_file_downloads_token($variables) {
$file_downloads = $variables['file_downloads'];
$output = '';
foreach ($file_downloads as $file_download) {
// Let's only notify of them of the files, not the directories.
if (is_dir($file_download->filename)) {
continue;
}
$output .= l($file_download->filename, 'download/' . $file_download->fid, array(
'absolute' => TRUE,
)) . "\n";
}
return $output;
}