You are here

function theme_imagecache_formatter in ImageCache 5

1 theme call to theme_imagecache_formatter()
imagecache_field_formatter in ./imagecache.module
Implementation of hook_field_formatter().

File

./imagecache.module, line 730
Dynamic image resizer and image cacher.

Code

function theme_imagecache_formatter($field, $item, $formatter) {
  if (preg_match('/_linked$/', $formatter)) {
    $formatter = preg_replace('/_linked$/', '', $formatter);
    $image = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
    $output = l($image, 'node/' . $item['nid'], array(), NULL, NULL, FALSE, TRUE);
  }
  else {
    $output = theme('imagecache', $formatter, $item['filepath'], $item['alt'], $item['title']);
  }
  return $output;
}