function theme_download_file_bytes_accessible in DownloadFile 7
Same name and namespace in other branches
- 6 download_file.formatter.inc \theme_download_file_bytes_accessible()
- 7.3 download_file.formatter.inc \theme_download_file_bytes_accessible()
- 7.2 download_file.formatter.inc \theme_download_file_bytes_accessible()
Theme function for the size format accessible.
Parameters
$filesize: File size to format.
Return value
A string containing the HTML ouput.
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 284
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>';
}