PluginProbe
WP Directory Kit / 1.3.3
WP Directory Kit v1.3.3
1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 1.4.0 1.4.1 All 35 releases
wpdirectorykit / elementor-elements / views / wdk-listing-sliders-carousel.php

wdk-listing-sliders-carousel.php in WP Directory Kit 1.3.3, at elementor-elements/views/wdk-listing-sliders-carousel.php

166 lines 10.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Element Listing Images Slider.
4 * This is the template that elementor element slider, carousel
5 *
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 ?>
13 <div class="wdk-element" id="wdk_el_<?php echo esc_html($id_element);?>">
14 <div class="wdk-listing-sliders-carousel">
15 <?php if(count($images) > 2):?>
16 <?php if(count($images) > 0):?>
17 <div class="wdk_listing_slider_box wdk_js_gallery <?php echo esc_attr($settings['layout_carousel_animation_style']).'_animation';?> <?php echo esc_attr(join(' ', [$settings['styles_carousel_dots_position_style'], $settings['styles_carousel_arrows_position_style'],$settings['styles_carousel_arrows_position'],$settings['styles_carousel_arrows_position_style']]));?>">
18 <div class="wdk_listing_slider_ini">
19 <?php foreach($images as $image):?>
20 <?php if(!wmvc_show_data('wdk_listing_video_disabled',$settings, false) && wdk_file_extension_type(wmvc_show_data('src',$image)) == 'video'):?>
21 <div class="wdk-col">
22 <video controls src="<?php echo esc_url(wmvc_show_data('src',$image));?>" alt="<?php echo esc_attr(wmvc_show_data('alt',$image));?>" class="wdk-listing-image-card wdk-listing-image <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>"></video>
23 </div>
24 <?php elseif(wdk_file_extension_type(wmvc_show_data('src',$image)) == 'image'):?>
25 <div class="wdk-col">
26 <img src="<?php echo esc_url(wmvc_show_data('src',$image));?>" class="wdk-listing-image-card wdk-listing-image <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>" alt="<?php echo esc_attr(wmvc_show_data('alt',$image));?>">
27 </div>
28 <?php endif;?>
29 <?php endforeach;?>
30
31 <?php if(!empty($images) && 1 < wmvc_count($images)):?>
32 </div>
33 <div class="wdk-listing-sliders-carousel_arrows">
34 <a class="wdk-slider-prev wdk-listing-sliders-carousel_arrow">
35 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_left'], [ 'aria-hidden' => 'true' ] ); ?>
36 </a>
37 <a class="wdk-slider-next wdk-listing-sliders-carousel_arrow">
38 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_right'], [ 'aria-hidden' => 'true' ] ); ?>
39 </a>
40 </div>
41 </div>
42 <?php else:?>
43 </div>
44 <?php endif;?>
45 <?php endif;?>
46
47 <?php if(count($images) > 1):?>
48 <div class="wdk-cls-banner-thumbs">
49 <div class="banner-thumbs">
50 <?php foreach($images as $image):?>
51 <?php if(!wmvc_show_data('wdk_listing_video_disabled',$settings, false) && wdk_file_extension_type(wmvc_show_data('src',$image)) == 'video'):?>
52 <div class="banner-thumb">
53 <video src="<?php echo esc_url(wmvc_show_data('src',$image));?>" alt="<?php echo esc_attr(wmvc_show_data('alt',$image));?>" class="wdk-listing-image <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>"></video>
54 </div>
55 <?php elseif(wdk_file_extension_type(wmvc_show_data('src',$image)) == 'image'):?>
56 <div class="banner-thumb">
57 <img src="<?php echo esc_url(wmvc_show_data('src',$image));?>" class="wdk-listing-image <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>" alt="<?php echo esc_attr(wmvc_show_data('alt',$image));?>">
58 </div>
59 <?php endif;?>
60 <?php endforeach;?>
61 </div><!--banner-thumbs end-->
62 </div>
63 <?php endif;?>
64 <?php else:?>
65 <div class="wdk-static wdk_listing_slider_box wdk_js_gallery <?php echo esc_attr($settings['layout_carousel_animation_style']).'_animation';?> <?php echo esc_attr(join(' ', [$settings['styles_carousel_dots_position_style'], $settings['styles_carousel_arrows_position_style'],$settings['styles_carousel_arrows_position'],$settings['styles_carousel_arrows_position_style']]));?>">
66 <?php foreach($images as $image):?>
67 <?php if(!wmvc_show_data('wdk_listing_video_disabled',$settings, false) && wdk_file_extension_type(wmvc_show_data('src',$image)) == 'video'):?>
68 <div class="wdk-col">
69 <video controls src="<?php echo esc_url(wmvc_show_data('src',$image));?>" alt="<?php echo esc_attr(wmvc_show_data('alt',$image));?>" class="wdk-listing-image-card wdk-listing-image <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>"></video>
70 </div>
71 <?php elseif(wdk_file_extension_type(wmvc_show_data('src',$image)) == 'image'):?>
72 <div class="wdk-col">
73 <img src="<?php echo esc_url(wmvc_show_data('src',$image));?>" class="wdk-listing-image-card wdk-listing-image <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>" alt="<?php echo esc_attr(wmvc_show_data('alt',$image));?>">
74 </div>
75 <?php endif;?>
76 <?php endforeach;?>
77 </div>
78 <?php endif;?>
79 </div>
80 <script>
81 jQuery(document).ready(function($){
82 <?php if(count($images) > 2):?>
83 $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_listing_slider_ini').slick({
84 dots: false,
85 infinite: true,
86 speed: 300,
87 slidesToShow: 1,
88 variableWidth: true,
89 slidesToShow: 1,
90
91 <?php if(!empty(wmvc_show_data('layout_carousel_is_autoplay', $settings))):?>
92 autoplay: <?php echo wmvc_show_data('layout_carousel_is_autoplay', $settings, 'false');?>,
93 <?php endif;?>
94 autoplaySpeed: '<?php echo esc_html($settings['layout_carousel_speed'], '100');?>',
95
96 nextArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk-listing-sliders-carousel_arrows .wdk-slider-next'),
97 prevArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk-listing-sliders-carousel_arrows .wdk-slider-prev'),
98 customPaging: function(slider, i) {
99 // this example would render "tabs" with titles
100 return '<span class="wdk_dot"><?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_dots_icon'], [ 'aria-hidden' => 'true' ] ); ?></span>';
101 },
102 responsive: [
103 {
104 breakpoint: 600,
105 settings: {
106 slidesToShow: 1,
107 slidesToScroll: 1
108 }
109 },
110 ]
111 });
112
113 $('#wdk_el_<?php echo esc_html($id_element);?> .banner-thumbs').slick({
114 asNavFor: '#wdk_el_<?php echo esc_html($id_element);?> .wdk_listing_slider_ini',
115 dots: false,
116 arrows: false,
117 focusOnSelect: true,
118 slidesToScroll: 1,
119
120
121 <?php if(wmvc_show_data('layout_carousel_nav_is_infinite', $settings) == 'true'):?>
122 infinite: <?php echo wmvc_show_data('layout_carousel_nav_is_infinite', $settings, 'true');?>,
123 <?php endif;?>
124
125 <?php if(!empty(wmvc_show_data('layout_carousel_nav_speed', $settings))):?>
126 speed: <?php echo intval(wmvc_show_data('layout_carousel_nav_speed', $settings, 100));?>,
127 <?php endif;?>
128
129 <?php if(wmvc_show_data('layout_carousel_nav_is_center', $settings) == 'true'):?>
130 centerMode: true,
131 <?php endif;?>
132
133 <?php if(wmvc_show_data('layout_carousel_nav_is_autoplay', $settings) == 'true'):?>
134 autoplay: true,
135 <?php endif;?>
136
137 <?php if(!empty(wmvc_show_data('layout_carousel_nav_autoplay_speed', $settings))):?>
138 autoplaySpeed: <?php echo intval(wmvc_show_data('layout_carousel_nav_autoplay_speed', $settings, 2000));?>,
139 <?php endif;?>
140
141 <?php if(wmvc_show_data('layout_carousel_nav_variableWidth', $settings) == 'true'):?>
142 variableWidth: true,
143 <?php endif;?>
144
145 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('styles_thmbn_nav_columns', $settings, '4')))) ? wmvc_show_data('styles_thmbn_nav_columns', $settings, '4') : 4;?>,
146 responsive: [
147 {
148 breakpoint: 991,
149 settings: {
150 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('styles_thmbn_nav_columns_tablet', $settings, '3')))) ? wmvc_show_data('styles_thmbn_nav_columns_tablet', $settings, '3') : 3;?>,
151 }
152 },
153 {
154 breakpoint: 768,
155 settings: {
156 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('styles_thmbn_nav_columns_mobile', $settings, '2')))) ? wmvc_show_data('styles_thmbn_nav_columns_mobile', $settings, '2') : 2;?>,
157 }
158 },
159 ]
160 });
161 <?php endif;?>
162 })
163 </script>
164 </div>
165
166