<div class="<?php echo implode(' ', $class); ?> "> <?php foreach ($slides as $slide) { ?> <?php $slide_data = array('type' => $slide['type']); if ($slide_data['type'] != 'image') { $slide_data['autoplay'] = $slide['autoplay']; } ?> <div class="slide" <?php thb_data_attributes($slide_data); ?> > <?php if ($slide['type'] == 'image') { ?> <img src="<?php echo thb_image_get_size($slide['id'], $image_size); ?> " alt=""> <?php } else { ?> <?php $attributes = thb_get_attributes(array('url' => $slide['url'], 'class' => 'thb_slideshow_video thb-noFit', 'autoplay' => $slide['autoplay'], 'loop' => $slide['loop'])); echo thb_do_shortcode('[thb_video ' . $attributes . ']');
/** * Read the modal configuration and make them available for the Javascript side of things. * * @param array $params The portfolio loop parameters. */ function thb_portfolio_data_attributes($params = array()) { if (!thb_portfolio_framework_check()) { return; } $params = wp_parse_args($params, array('ajax_pagination' => (int) thb_get_post_meta(get_the_ID(), 'works_ajax_pagination'))); $data = array('ajax' => (int) isset($params['ajax_pagination']) ? $params['ajax_pagination'] : 0, 'base' => get_permalink(thb_get_page_ID())); thb_data_attributes($data); }