Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I did this quick fix in media_gallery.theme.inc with the help Olleolleolle to be able to show image captions. Perhaps should this be fixed in the next version, or maybe I spent too short a time analysing the issue. This works for me and my project right now though...
media_gallery.theme.inc, row 382
-$output .= theme('media_gallery_item', array('image' => $image, 'link_path' => $link_path, 'classes' => $classes));
+$output .= theme('media_gallery_item', array('image' => $image, 'link_path' => $link_path, 'classes' => $classes, 'title'=> $element['#file']->media_title['und'][0]['safe_value'] ) );
media_gallery.theme.inc, row 441
$item .= '</div></div><div class="bottom"><div class="bottom-inset-1"><div class="bottom-inset-2"></div></div></div></div>';
$item .= '</div></div><div class="bottom"><div class="bottom-inset-1"><div class="bottom-inset-2">' . $variables['title'] . '</div></div></div></div>';
Comments
Comment #1
leanderl CreditAttribution: leanderl commentedI was bit too quick there. The second code snippet should have - and + like this
Comment #2
ivnish CreditAttribution: ivnish commented