You are here

function filefield_icon_url in FileField 5.2

Same name and namespace in other branches
  1. 6.3 filefield.module \filefield_icon_url()
  2. 6.2 filefield.module \filefield_icon_url()

Determine the most appropriate icon for the given file's mimetype.

Return value

The URL of the icon image file, or FALSE if no icon could be found.

1 call to filefield_icon_url()
theme_filefield_icon in ./filefield.module

File

./filefield.module, line 965
Defines a file field type.

Code

function filefield_icon_url($file) {
  global $base_url;
  $theme = variable_get('filefield_icon_theme', 'protocons');
  if ($iconpath = _filefield_icon_path($file, $theme)) {
    return $base_url . '/' . $iconpath;
  }
  return FALSE;
}