Views Slideshow: pager.

Paramètres

array $vars: Theme variables.

Return value

string The html string for the pager widget or an empty string if disabled.

Sujets associés

Fichier

theme/views_slideshow.theme.inc, line 219

Code

function theme_views_slideshow_pager_widget_render($vars) {
    if (isset($vars['settings']['hide_on_single_slide']) && $vars['settings']['hide_on_single_slide'] === 1 && count($vars['rows']) < 2) {
        return '';
    }
    // Add JavaScript settings for the pager type.
    $js_vars = array(
        'viewsSlideshowPager' => array(
            $vars['vss_id'] => array(
                $vars['location'] => array(
                    'type' => views_slideshow_format_addons_name($vars['settings']['type']),
                    'master_pager' => views_slideshow_format_addons_name($vars['settings']['master_pager']),
                ),
            ),
        ),
    );
    drupal_add_library('views_slideshow', 'views_slideshow');
    drupal_add_js($js_vars, 'setting');
    // Create some attributes.
    $attributes['class'] = 'widget_pager widget_pager_' . $vars['location'];
    $attributes['id'] = 'widget_pager_' . $vars['location'] . '_' . $vars['vss_id'];
    return 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'],
        'attributes' => $attributes,
    ));
}