You are here

function theme_hover_preview_image_formatter in Hover Preview for ImageCache 7

Returns HTML for the Hover Preview image formatter.

Parameters

$variables: An associative array containing:

  • item: The array of element data.
  • image: The image to to display, containing the required classes.
  • path: An array containing the link 'path' and link 'options'.

File

./hover_preview.module, line 215

Code

function theme_hover_preview_image_formatter($variables) {

  // Render the image first.
  $output = theme('image', $variables['image']);

  // See if we are to output the image as a link.
  if (!empty($variables['path'])) {
    $path = $variables['path']['path'];
    $options = $variables['path']['options'];
    $output = l($output, $path, $options);
  }
  return $output;
}