function _filefield_icon_url in FileField 6.3
Same name and namespace in other branches
- 6.2 filefield.theme.inc \_filefield_icon_url()
Given a file object, create a URL to a matching icon.
Parameters
$file: A file object.
$theme: Optional. The theme to be used for the icon. Defaults to the value of the "filefield_icon_theme" variable.
Return value
A URL string to the icon, or FALSE if an appropriate icon could not be found.
1 call to _filefield_icon_url()
- filefield_icon_url in ./
filefield.module - Determine the most appropriate icon for the given file's mimetype.
File
- ./
filefield.theme.inc, line 42 - Theme functions used for normal file output.
Code
function _filefield_icon_url($file, $theme = NULL) {
global $base_url;
if ($icon_path = _filefield_icon_path($file, $theme)) {
return $base_url . '/' . $icon_path;
}
return FALSE;
}