You are here

function theme_shrinktheweb_image in ShrinkTheWeb 6

Same name and namespace in other branches
  1. 7 shrinktheweb.module \theme_shrinktheweb_image()

Displays the thumbnail.

@access public

Parameters

mixed $url:

array $options. The attributes to apply to the thumbnail image.:

Return value

mixed. Link with the image tag or FALSE on error.

File

./shrinktheweb.module, line 89

Code

function theme_shrinktheweb_image($url, $options = array()) {
  $src = shrinktheweb_get_thumbnail($url);
  if ($src) {
    return l(theme('image', $src, $options['alt'], $options['title'], NULL, FALSE), $url, array(
      'html' => TRUE,
      'attributes' => array(
        'target' => '_blank',
      ),
    ));
  }
  return FALSE;
}