You are here

function linkimagefield_field_formatter in Link Image Field 5

Implementation of hook_field_formatter().

File

./linkimagefield.module, line 591
Defines an link image field type. linkimagefield uses content.module to store the fid, and the drupal files table to store the actual file data.

Code

function linkimagefield_field_formatter($field, $item, $formatter) {
  if (empty($item['fid'])) {
    return '';
  }
  $file = _linkimagefield_file_load($item['fid']);
  return theme('linkimagefield_image', $file, $item['alt'], $item['url'], $item['title']);
}