function template_preprocess_views_slideshow_xtra_text in Views Slideshow Xtra 7.2
Same name and namespace in other branches
- 6.3 views_slideshow_xtra.module \template_preprocess_views_slideshow_xtra_text()
- 7.3 theme/views_slideshow_xtra.theme.inc \template_preprocess_views_slideshow_xtra_text()
- 7 theme/views_slideshow_xtra.theme.inc \template_preprocess_views_slideshow_xtra_text()
Text element template_preprocess.
File
- theme/
views_slideshow_xtra.theme.inc, line 96 - Views Slideshow Xtra theming functions.
Code
function template_preprocess_views_slideshow_xtra_text(&$vars) {
// Classes
$vars['classes_array'][] = 'views-slideshow-xtra-element';
$vars['classes_array'][] = 'views-slideshow-xtra-text-' . $vars['slide_count'] . '-' . $vars['field_item_count'];
if (!empty($vars['vsx']['classes'])) {
$vars['classes_array'][] = $vars['vsx']['classes'];
}
// Styles variable
$vars['styles'] = $vars['vsx']['styles'];
// Text variable
$vars['text'] = $vars['vsx']['text'];
// Send data to Javascript
$js_vars = array(
'viewsSlideshowXtra' => array(
$vars['vss_id'] => array(
'slideInfo' => array(
'text' => array(
'slide-' . $vars['slide_count'] => array(
'item-' . $vars['field_item_count'] => array(
'left' => $vars['vsx']['left'],
'top' => $vars['vsx']['top'],
),
),
),
),
),
),
);
drupal_add_js($js_vars, 'setting');
}