function theme_imagefield_formatter_image_nodelink in ImageField 6.3
File
- ./
imagefield_formatter.inc, line 24 - ImageField formatter hooks and callbacks.
Code
function theme_imagefield_formatter_image_nodelink($element) {
// Inside a view $element may contain null data. In that case, just return.
if (empty($element['#item']['fid'])) {
return '';
}
$node = $element['#node'];
$imagetag = theme('imagefield_formatter_image_plain', $element);
$class = 'imagefield imagefield-nodelink imagefield-' . $element['#field_name'];
return l($imagetag, 'node/' . $node->nid, array(
'attributes' => array(
'class' => $class,
),
'html' => TRUE,
));
}