function theme_views_slideshow_controls_widget_render in Views Slideshow 7.3
Same name and namespace in other branches
- 6.3 theme/views_slideshow.theme.inc \theme_views_slideshow_controls_widget_render()
Views Slideshow: Controls.
Parameters
array $vars: Theme variables.
Return value
string The html string for the control widget.
Related topics
File
- theme/
views_slideshow.theme.inc, line 358 - The theme system, which controls the output of views slideshow.
Code
function theme_views_slideshow_controls_widget_render($vars) {
// Add JavaScript settings for the controls type.
$js_vars = array(
'viewsSlideshowControls' => array(
$vars['vss_id'] => array(
$vars['location'] => array(
'type' => views_slideshow_format_addons_name($vars['settings']['type']),
),
),
),
);
drupal_add_library('views_slideshow', 'views_slideshow');
drupal_add_js($js_vars, 'setting');
$items_per_slide = isset($vars['view']->style_options['views_slideshow_cycle']['items_per_slide']) ? $vars['view']->style_options['views_slideshow_cycle']['items_per_slide'] : null;
$output = '';
if (empty($vars['settings']['hide_on_single_slide']) || count($vars['rows']) > $items_per_slide) {
$output = theme(views_theme_functions($vars['settings']['type'], $vars['view'], $vars['view']->display[$vars['view']->current_display]), array(
'vss_id' => $vars['vss_id'],
'view' => $vars['view'],
'settings' => $vars['settings'],
'location' => $vars['location'],
'rows' => $vars['rows'],
));
}
return $output;
}