Skip navigation
Help

theme_uc_file_downloads_token

6 uc_file.module theme_uc_file_downloads_token($user_files)
7 uc_file.tokens.inc theme_uc_file_downloads_token($variables)

Themes the file download links token.

Related topics

1 theme call to theme_uc_file_downloads_token()

File

ubercart/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;
}