function theme_download_file_bytes_accessible in DownloadFile 6
Same name and namespace in other branches
- 7.3 download_file.formatter.inc \theme_download_file_bytes_accessible()
- 7 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 400 - Download file formatter hooks and callbacks.
Code
function theme_download_file_bytes_accessible($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>';
}