You are here

function theme_download_file_bytes_accessible in DownloadFile 7.3

Same name and namespace in other branches
  1. 6 download_file.formatter.inc \theme_download_file_bytes_accessible()
  2. 7 download_file.formatter.inc \theme_download_file_bytes_accessible()
  3. 7.2 download_file.formatter.inc \theme_download_file_bytes_accessible()

Theme function for the size format accessible. @todo Replace with

Parameters

$variables:

Return value

string A string containing the HTML output.

See also

format_size() function?

1 theme call to theme_download_file_bytes_accessible()
theme_download_file_detail_accessible in ./download_file.formatter.inc
Theme function for the link accessible.

File

./download_file.formatter.inc, line 306

Code

function theme_download_file_bytes_accessible($variables) {
  $filesize = $variables['filesize'];
  if (empty($filesize)) {
    return '';
  }
  list($size, $unit) = download_file_format_bytes($filesize, 0);
  $acronyms = array(
    t('B') => t('Bytes'),
    t('KB') => t('Kilo Bytes'),
    t('MB') => t('Mega Bytes'),
    t('GB') => t('Giga Bytes'),
    t('TB') => t('Tera Bytes'),
    t('PB') => t('Peta Bytes'),
  );
  return $size . ' <acronym title="' . $acronyms[$unit] . '">' . $unit . '</acronym>';
}