Commit f81c20fc authored by frjo's avatar frjo
Browse files

Issue #1249902 by LinL: Undefined variable: caption in theme_colorbox_image_formatter().

parent 1b54d532
......@@ -38,13 +38,17 @@ function theme_colorbox_image_formatter($variables) {
switch ($settings['colorbox_caption']) {
case 'auto':
// If the title is empty use alt or the node title in that order.
if (empty($image['title'])) {
if (!empty($image['alt'])) {
$caption = $image['alt'];
}
elseif (!empty($node->title)) {
$caption = $node->title;
}
if (!empty($image['title'])) {
$caption = $image['title'];
}
elseif (!empty($image['alt'])) {
$caption = $image['alt'];
}
elseif (!empty($node->title)) {
$caption = $node->title;
}
else {
$caption = '';
}
break;
case 'title':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment