PluginProbe
WP Directory Kit / 1.2.7
WP Directory Kit v1.2.7
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.php

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

159 lines 8.9 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">
15 <?php if(count($images) > 0):?>
16 <div class="wdk_listing_slider_box <?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']]));?>">
17 <div class="wdk_listing_slider_ini">
18 <?php foreach($images as $image):?>
19 <?php if(!wmvc_show_data('wdk_listing_video_disabled',$settings, false) && wdk_file_extension_type(wmvc_show_data('src',$image)) == 'video'):?>
20 <div class="wdk-col">
21 <div class="wdk-listing-image-card">
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 <?php if($settings['enable_fixed_height']!='yes'):?> auto_height <?php endif;?>"></video>
23 </div>
24 </div>
25 <?php elseif(wdk_file_extension_type(wmvc_show_data('src',$image)) == 'image'):?>
26 <div class="wdk-col">
27 <div class="wdk-listing-image-card">
28 <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));?>">
29 </div>
30 </div>
31 <?php endif;?>
32 <?php endforeach;?>
33
34 <?php if(!empty($images) && 1 < wmvc_count($images)):?>
35 </div>
36 <div class="wdk-listing-sliders_arrows">
37 <a class="wdk-slider-prev wdk-listing-sliders_arrow">
38 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_left'], [ 'aria-hidden' => 'true' ] ); ?>
39 </a>
40 <a class="wdk-slider-next wdk-listing-sliders_arrow">
41 <?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_arrows_icon_right'], [ 'aria-hidden' => 'true' ] ); ?>
42 </a>
43 </div>
44 </div>
45 <?php else:?>
46 </div>
47 <?php endif;?>
48 <?php endif;?>
49
50 <?php if(count($images) > 1):?>
51 <div class="wdk-cls-banner-thumbs">
52 <div class="banner-thumbs">
53 <?php foreach($images as $image):?>
54 <?php if(!wmvc_show_data('wdk_listing_video_disabled',$settings, false) && wdk_file_extension_type(wmvc_show_data('src',$image)) == 'video'):?>
55 <div class="banner-thumb">
56 <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>
57 </div>
58 <?php elseif(wdk_file_extension_type(wmvc_show_data('src',$image)) == 'image'):?>
59 <div class="banner-thumb">
60 <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));?>">
61 </div>
62 <?php endif;?>
63 <?php endforeach;?>
64 </div><!--banner-thumbs end-->
65 </div>
66 <?php endif;?>
67 </div>
68 <script>
69 jQuery(document).ready(function($){
70 $('#wdk_el_<?php echo esc_html($id_element);?> .wdk_listing_slider_ini').slick({
71 <?php if(1 < wmvc_count($images)):?>
72 dots: true,
73 arrows: true,
74 <?php else:?>
75 dots: false,
76 arrows: false,
77 <?php endif;?>
78 slidesToShow: 1,
79 slidesToScroll: 1,
80 <?php if(!empty(wmvc_show_data('layout_carousel_is_infinite', $settings))):?>
81 infinite: <?php echo wmvc_show_data('layout_carousel_is_infinite', $settings, 'true');?>,
82 <?php endif;?>
83 <?php if(!empty(wmvc_show_data('layout_carousel_is_autoplay', $settings))):?>
84 autoplay: <?php echo wmvc_show_data('layout_carousel_is_autoplay', $settings, 'false');?>,
85 <?php endif;?>
86 autoplaySpeed: '<?php echo esc_html($settings['layout_carousel_speed'], '100');?>',
87 <?php if(in_array($settings['layout_carousel_animation_style'], ['fade','fade_in'])):?>
88 fade: true,
89 <?php endif;?>
90 nextArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk-listing-sliders_arrows .wdk-slider-next'),
91 prevArrow: $('#wdk_el_<?php echo esc_html($id_element);?> .wdk-listing-sliders_arrows .wdk-slider-prev'),
92 customPaging: function(slider, i) {
93 // this example would render "tabs" with titles
94 return '<span class="wdk_dot"><?php \Elementor\Icons_Manager::render_icon( $settings['styles_carousel_dots_icon'], [ 'aria-hidden' => 'true' ] ); ?></span>';
95 },
96 responsive: [
97 {
98 breakpoint: 600,
99 settings: {
100 slidesToShow: 1,
101 slidesToScroll: 1
102 }
103 },
104 ]
105 });
106
107 $('#wdk_el_<?php echo esc_html($id_element);?> .banner-thumbs').slick({
108 asNavFor: '#wdk_el_<?php echo esc_html($id_element);?> .wdk_listing_slider_ini',
109 dots: false,
110 arrows: false,
111 focusOnSelect: true,
112 slidesToScroll: 1,
113
114
115 <?php if(wmvc_show_data('layout_carousel_nav_is_infinite', $settings) == 'true'):?>
116 infinite: <?php echo wmvc_show_data('layout_carousel_nav_is_infinite', $settings, 'true');?>,
117 <?php endif;?>
118
119 <?php if(!empty(wmvc_show_data('layout_carousel_nav_speed', $settings))):?>
120 speed: <?php echo intval(wmvc_show_data('layout_carousel_nav_speed', $settings, 100));?>,
121 <?php endif;?>
122
123 <?php if(wmvc_show_data('layout_carousel_nav_is_center', $settings) == 'true'):?>
124 centerMode: true,
125 <?php endif;?>
126
127 <?php if(wmvc_show_data('layout_carousel_nav_is_autoplay', $settings) == 'true'):?>
128 autoplay: true,
129 <?php endif;?>
130
131 <?php if(!empty(wmvc_show_data('layout_carousel_nav_autoplay_speed', $settings))):?>
132 autoplaySpeed: <?php echo intval(wmvc_show_data('layout_carousel_nav_autoplay_speed', $settings, 2000));?>,
133 <?php endif;?>
134
135 <?php if(wmvc_show_data('layout_carousel_nav_variableWidth', $settings) == 'true'):?>
136 variableWidth: true,
137 <?php endif;?>
138
139 slidesToShow: <?php echo (!empty(trim(wmvc_show_data('styles_thmbn_nav_columns', $settings, '4')))) ? wmvc_show_data('styles_thmbn_nav_columns', $settings, '4') : 4;?>,
140 responsive: [
141 {
142 breakpoint: 991,
143 settings: {
144 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;?>,
145 }
146 },
147 {
148 breakpoint: 768,
149 settings: {
150 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;?>,
151 }
152 },
153 ]
154 });
155 })
156 </script>
157 </div>
158
159