You are here

function _filefield_icon_url in FileField 6.2

Same name and namespace in other branches
  1. 6.3 filefield.theme.inc \_filefield_icon_url()
2 calls to _filefield_icon_url()
filefield_icon_url in ./filefield.module
Determine the most appropriate icon for the given file's mimetype.
theme_filefield_icon in ./filefield.theme.inc
Return an image with an appropriate icon for the given file. Remember to pass a file object and not an array.

File

./filefield.theme.inc, line 83
FileField: Defines a CCK 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;
}