You are here

function theme_link_image_formatter in Link Image Formatter 7

Returns HTML for an image caption field formatter.

Parameters

$variables: An associative array containing:

  • item: An array of link data.
1 theme call to theme_link_image_formatter()
link_image_field_formatter_view in ./link_image.module
Implements hook_field_formatter_view().

File

./link_image.module, line 55

Code

function theme_link_image_formatter($vars) {
  $item = $vars['element'];
  $image = array(
    'path' => theme('link_formatter_link_plain', $vars),
  );

  // Do not output an empty 'title' attribute.
  if (drupal_strlen($item['title']) > 0) {
    $image['title'] = $item['title'];
    $image['alt'] = $item['title'];
  }
  $output = theme('image', $image);
  return $output;
}