function _views_slideshow_xtra_preprocess_image in Views Slideshow Xtra 6.3
Image element template_preprocess.
1 call to _views_slideshow_xtra_preprocess_image()
File
- theme/
views_slideshow_xtra.theme.inc, line 183 - Views Slideshow Xtra theming functions.
Code
function _views_slideshow_xtra_preprocess_image(&$vars) {
// Classes
$vars['attributes']['class'] = 'views-slideshow-xtra-element';
$vars['attributes']['class'] .= ' views-slideshow-xtra-image-' . $vars['slide_count'] . '-' . $vars['field_item_count'];
if (!empty($vars['vsx']['classes'])) {
$vars['attributes']['class'] .= ' ' . $vars['vsx']['classes'];
}
// Styles variable
$vars['attributes']['style'] = $vars['vsx']['styles'];
// Text variable
$vars['text'] = $vars['vsx']['text'];
// url variable
$vars['url'] = $vars['vsx']['url'];
// src variable
$vars['src'] = $vars['vsx']['src'];
// target variable
$vars['target'] = $vars['vsx']['target'];
$js_vars = array(
'viewsSlideshowXtra' => array(
$vars['vss_id'] => array(
'slideInfo' => array(
'image' => 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');
}