function theme_node_gallery_formatter_gallerylink in Node Gallery 6.3
Link an image to its gallery.
1 string reference to 'theme_node_gallery_formatter_gallerylink'
- node_gallery_theme in ./
node_gallery.module - Implements hook_theme().
File
- theme/
theme.inc, line 222 - Node gallery theme functions
Code
function theme_node_gallery_formatter_gallerylink($element) {
if (empty($element['#item']['fid'])) {
return '';
}
$imagetag = theme_imagecache_formatter_default($element);
if (!in_array($element['#node']->type, (array) node_gallery_get_types('image'))) {
return $imagetag;
}
$node = node_load($element['#node']->nid);
$class = 'imagefield image-gallerylink imagefield-' . $element['#field_name'];
$options = array(
'attributes' => array(
'class' => $class,
),
'html' => TRUE,
);
return l($imagetag, 'node/' . $node->gid, $options);
}