}
/* before shortcode. */
do_action('visualcarousel/shortcodes/carousel/before');
?>
<div class="<?php 
echo implode(' ', $_class);
?>
">
	<div class="visual-carousel-items"<?php 
echo visual_carousel()->process_attributes($data);
?>
>

        <?php 
/* get content template. */
$template_content = visual_carousel_get_template_part('content', '', true);
/* from query. */
if (isset($carousel) && $carousel->have_posts()) {
    while ($carousel->have_posts()) {
        $carousel->the_post();
        load_template($template_content, true);
    }
}
/* vc elements. */
echo apply_filters('the_content', $content);
?>
	</div>
</div>

<?php 
/* after shortcode. */
 function add_shortcode_visual_carousel($atts, $content = '')
 {
     global $shortcode_template;
     $slider_source = $style = $items = $margin = $loop = $center = $stagepadding = $merge = $autowidth = $startposition = $smart_speed = $nav = $nav_type = $next_text = $prev_text = $next_icon = $prev_icon = $nav_position = $nav_align = $dots = $dots_position = $dots_align = $autoplay = $autoplay_timeout = $autoplay_hover_pause = $autoplay_speed = $nav_speed = $dots_speed = $animate_in = $animate_out = $fallback_easing = $lazyload = $mousewheel = $responsive = '';
     extract(shortcode_atts(array('slider_source' => '', 'style' => 'default', 'items' => '', 'margin' => '', 'loop' => '', 'center' => '', 'stagepadding' => '', 'merge' => '', 'autowidth' => '', 'startposition' => '', 'nav' => '', 'nav_type' => '', 'next_text' => '', 'next_icon' => '', 'prev_text' => '', 'prev_icon' => '', 'nav_position' => 'bottom', 'dots_position' => 'bottom', 'nav_align' => 'left', 'dots_align' => 'right', 'dots' => '', 'autoplay' => '', 'autoplay' => '', 'autoplay_timeout' => '', 'autoplay_hover_pause' => '', 'smart_speed' => '', 'autoplay_speed' => '', 'nav_speed' => '', 'dots_speed' => '', 'responsive' => '', 'animate_out' => '', 'animate_in' => '', 'mousewheel' => ''), $atts));
     $data = array('data-items' => esc_attr($items), 'data-margin' => esc_attr($margin), 'data-loop' => esc_attr($loop), 'data-center' => esc_attr($center), 'data-stagepadding' => esc_attr($stagepadding), 'data-merge' => esc_attr($merge), 'data-autowidth' => esc_attr($autowidth), 'data-startposition' => esc_attr($startposition), 'data-smart_speed' => esc_attr($smart_speed), 'data-nav' => esc_attr($nav), 'data-dots' => esc_attr($dots), 'data-autoplay_speed' => esc_attr($autoplay_speed), 'data-autoplay' => esc_attr($autoplay), 'data-autoplay_timeout' => esc_attr($autoplay_timeout), 'data-autoplay_hover_pause' => esc_attr($autoplay_hover_pause), 'data-nav_speed' => esc_attr($nav_speed), 'data-dots_speed' => esc_attr($dots_speed), 'data-animate_in' => esc_attr($animate_in), 'data-animate_out' => esc_attr($animate_out), 'data-mousewheel' => esc_attr($mousewheel), 'data-responsive' => esc_attr($responsive), 'data-mousewheel' => esc_attr($mousewheel));
     $shortcode_template = $style;
     /* nav custom. */
     if ($nav_type) {
         $data['data-next'] = esc_attr($next_text);
         $data['data-prev'] = esc_attr($prev_text);
     } else {
         $data['data-next'] = "<i class='" . esc_attr($next_icon) . "'></i>";
         $data['data-prev'] = "<i class='" . esc_attr($prev_icon) . "'></i>";
     }
     /* remove attributes null. */
     $data = array_filter($data);
     /* class */
     $_class = array('visual-carousel', 'template-' . $style);
     if ($nav) {
         $_class[] = 'nav-' . $nav_position;
         $_class[] = 'nav-' . $nav_align;
     }
     if ($dots) {
         $_class[] = 'dots-' . $dots_position;
         $_class[] = 'dots-' . $dots_align;
         /* load icon fonts. */
         vc_icon_element_fonts_enqueue('fontawesome');
     }
     $_class = apply_filters('visualcarousel/shortcodes/carousel/class', $_class);
     /* if source from query. */
     if ($slider_source) {
         $carousel = new WP_Query($this->parse_data($slider_source));
         set_query_var('carousel', $carousel);
     }
     /* load style. */
     visual_carousel_get_template_style();
     set_query_var('_class', $_class);
     set_query_var('data', $data);
     set_query_var('content', $content);
     ob_start();
     /* load template. */
     visual_carousel_get_template_part('archive', 'slider');
     wp_reset_postdata();
     return ob_get_clean();
 }