function theme_slick_thumbnail in Slick Carousel 7.3
Returns HTML for a thumbnail navigation.
Parameters
array $variables: An associative array containing:
- attributes: An array of attributes to apply to the element.
- delta: An index of the current item.
- item contains:
- slide: A renderable array of the thumbnail image/background.
- caption: A renderable array containing caption text for tab-like.
- settings: An array containing the given settings.
File
- templates/
slick.theme.inc, line 331 - Hooks and preprocess functions for the Slick module.
Code
function theme_slick_thumbnail(array $variables) {
_slick_preprocess_item($variables);
extract($variables);
$build = '';
// Cannot use FIGURE, as both slide and caption are optional. FIGURE makes
// no sense when only caption is provided for tab navigation, and no image.
if (!empty($item['slide'])) {
$build .= '<div class="slide__thumbnail">' . drupal_render($item['slide']) . '</div>';
}
if (!empty($item['caption'])) {
$build .= '<div class="slide__caption">' . drupal_render($item['caption']) . '</div>';
}
return $build ? '<div' . drupal_attributes($attributes_array) . '>' . $build . '</div>' : '';
}