PluginProbe
WP Directory Kit / 1.3.1
WP Directory Kit v1.3.1
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 / classes / wdk-listing-slider.php

wdk-listing-slider.php in WP Directory Kit 1.3.1, at elementor-elements/classes/wdk-listing-slider.php

811 lines 29.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Wdk\Elementor\Widgets;
4
5 use Wdk\Elementor\Widgets\WdkElementorBase;
6 use Elementor\Widget_Base;
7 use Elementor\Controls_Manager;
8 use Elementor\Utils;
9 use Elementor\Typography;
10 use Elementor\Editor;
11 use Elementor\Plugin;
12 use Elementor\Repeater;
13 use Elementor\Core\Schemes;
14 use Elementor\Icons_Manager;
15 use Elementor\Group_Control_Typography;
16 use Elementor\Group_Control_Border;
17 use Elementor\Group_Control_Box_Shadow;
18
19 if (!defined('ABSPATH'))
20 exit; // Exit if accessed directly
21
22 /**
23 * @since 1.1.0
24 */
25 class WdkListingSlider extends WdkElementorBase {
26
27 public function __construct($data = array(), $args = null) {
28
29 \Elementor\Controls_Manager::add_tab(
30 'tab_conf',
31 esc_html__('Settings', 'wpdirectorykit')
32 );
33
34 \Elementor\Controls_Manager::add_tab(
35 'tab_layout',
36 esc_html__('Layout', 'wpdirectorykit')
37 );
38
39 \Elementor\Controls_Manager::add_tab(
40 'tab_content',
41 esc_html__('Main', 'wpdirectorykit')
42 );
43
44 if ($this->is_edit_mode_load()) {
45 $this->enqueue_styles_scripts();
46 }
47 parent::__construct($data, $args);
48 }
49
50 /**
51 * Retrieve the widget name.
52 *
53 * @since 1.1.0
54 *
55 * @access public
56 *
57 * @return string Widget name.
58 */
59 public function get_name() {
60 return 'wdk-listing-slider';
61 }
62
63 /**
64 * Retrieve the widget title.
65 *
66 * @since 1.1.0
67 *
68 * @access public
69 *
70 * @return string Widget title.
71 */
72 public function get_title() {
73 return esc_html__('Wdk Listing Slider', 'wpdirectorykit');
74 }
75
76 /**
77 * Retrieve the list of categories the widget belongs to.
78 *
79 * Used to determine where to display the widget in the editor.
80 *
81 * Note that currently Elementor supports only one category.
82 * When multiple categories passed, Elementor uses the first one.
83 *
84 * @since 1.1.0
85 *
86 * @access public
87 *
88 * @return array Widget categories.
89 */
90 public function get_categories() {
91 return [ 'wdk-elementor-listing-preview-sliders' ];
92 }
93
94 /**
95 * Retrieve the widget icon.
96 *
97 * @since 1.1.0
98 *
99 * @access public
100 *
101 * @return string Widget icon.
102 */
103 public function get_icon() {
104 return 'eicon-post-navigation';
105 }
106
107 /**
108 * Register the widget controls.
109 *
110 * Adds different input fields to allow the user to change and customize the widget settings.
111 *
112 * @since 1.1.0
113 *
114 * @access protected
115 */
116 protected function register_controls() {
117 $this->generate_controls_conf();
118 $this->generate_controls_layout();
119 $this->generate_controls_styles();
120 $this->generate_controls_content();
121
122 $this->insert_pro_message('tab_conf');
123 parent::register_controls();
124 }
125
126 /**
127 * Render the widget output on the frontend.
128 *
129 * Written in PHP and used to generate the final HTML.
130 *
131 * @since 1.1.0
132 *
133 * @access protected
134 */
135 protected function render() {
136 parent::render();
137 global $wdk_listing_id;
138
139 $this->data['id_element'] = $this->get_id();
140 $this->data['settings'] = $this->get_settings();
141
142 $this->data['images'] = array();
143 if(!Plugin::$instance->editor->is_edit_mode()) {
144 $this->data['images'] = wdk_listing_images_data (array('listing_images'=>wdk_field_value ('listing_images', $wdk_listing_id)), 'full');
145 $this->data['images'] = array_slice($this->data['images'], ($this->data['settings']['offset_images']-1), $this->data['settings']['limit_images']);
146 } else {
147 $this->data['images'] = array_fill(0, $this->data['settings']['limit_images'], wdk_placeholder_image_src());
148 }
149
150 $this->data['is_edit_mode']= false;
151 if(Plugin::$instance->editor->is_edit_mode()) {
152 $this->data['is_edit_mode']= true;
153 } else {
154 /* return false if no content */
155 }
156
157 echo $this->view('wdk-listing-slider', $this->data);
158 }
159
160
161 private function generate_controls_conf() {
162 $this->start_controls_section(
163 'tab_conf_main_section',
164 [
165 'label' => esc_html__('Main', 'wpdirectorykit'),
166 'tab' => 'tab_conf',
167 ]
168 );
169
170
171 $this->add_control(
172 'popup_enable',
173 [
174 'label' => __( 'Open Images / Video in popup', 'wdk-listing-sliders' ),
175 'type' => \Elementor\Controls_Manager::SWITCHER,
176 'label_on' => __( 'On', 'wdk-listing-sliders' ),
177 'label_off' => __( 'Off', 'wdk-listing-sliders' ),
178 'return_value' => 'yes',
179 'default' => '',
180 ]
181 );
182
183 $this->add_control(
184 'limit_images',
185 [
186 'label' => __( 'Limit Images', 'wpdirectorykit' ),
187 'type' => \Elementor\Controls_Manager::NUMBER,
188 'min' => 1,
189 'max' => 100,
190 'step' => 1,
191 'default' => 10,
192 ]
193 );
194
195 $this->add_control(
196 'offset_images',
197 [
198 'label' => __( 'Offset Images', 'wpdirectorykit' ),
199 'type' => \Elementor\Controls_Manager::NUMBER,
200 'min' => 1,
201 'max' => 100,
202 'step' => 1,
203 'default' => 1,
204 ]
205 );
206
207 $this->add_control(
208 'wdk_listing_video_disabled',
209 [
210 'label' => __( 'Disable Video', 'wpdirectorykit' ),
211 'type' => \Elementor\Controls_Manager::SWITCHER,
212 'label_on' => __( 'True', 'wpdirectorykit' ),
213 'label_off' => __( 'False', 'wpdirectorykit' ),
214 'return_value' => '1',
215 'default' => '',
216 ]
217 );
218
219 $this->end_controls_section();
220
221 }
222
223 private function generate_controls_layout() {
224 $this->start_controls_section(
225 'tab_content',
226 [
227 'label' => esc_html__('Basic', 'wpdirectorykit'),
228 'tab' => 'tab_layout',
229 ]
230 );
231
232 $this->add_responsive_control(
233 'column_gap',
234 [
235 'label' => esc_html__('Columns Gap', 'wpdirectorykit'),
236 'type' => Controls_Manager::SLIDER,
237 'default' => [
238 'size' => 10,
239 ],
240 'range' => [
241 'px' => [
242 'min' => 0,
243 'max' => 60,
244 ],
245 ],
246 'selectors' => [
247 '{{WRAPPER}} .wdk-col' => 'padding-left: {{SIZE}}{{UNIT}};padding-right: {{SIZE}}{{UNIT}};',
248 '{{WRAPPER}} .wdk-row, {{WRAPPER}} .wdk_listing_slider_ini ' => 'margin-left: -{{SIZE}}{{UNIT}};margin-right: -{{SIZE}}{{UNIT}};',
249 ],
250 ]
251 );
252
253 $this->end_controls_section();
254
255 $this->start_controls_section(
256 'layout_carousel_sec',
257 [
258 'label' => esc_html__('Carousel Options', 'wpdirectorykit'),
259 'tab' => 'tab_layout',
260 ]
261 );
262
263 $this->add_control(
264 'layout_carousel_is_infinite',
265 [
266 'label' => __( 'Infinite', 'wpdirectorykit' ),
267 'type' => \Elementor\Controls_Manager::SWITCHER,
268 'label_on' => __( 'On', 'wpdirectorykit' ),
269 'label_off' => __( 'Off', 'wpdirectorykit' ),
270 'return_value' => 'true',
271 'default' => 'true',
272 ]
273 );
274
275 $this->add_control(
276 'layout_carousel_is_autoplay',
277 [
278 'label' => __( 'Autoplay', 'wpdirectorykit' ),
279 'type' => \Elementor\Controls_Manager::SWITCHER,
280 'label_on' => __( 'On', 'wpdirectorykit' ),
281 'label_off' => __( 'Off', 'wpdirectorykit' ),
282 'return_value' => 'true',
283 'default' => '',
284 ]
285 );
286
287 $this->add_control(
288 'layout_carousel_speed',
289 [
290 'label' => __( 'Speed', 'wpdirectorykit' ),
291 'type' => \Elementor\Controls_Manager::NUMBER,
292 'min' => 0,
293 'max' => 100000,
294 'step' => 100,
295 'default' => 500,
296 ]
297 );
298
299 $this->add_control(
300 'layout_carousel_animation_style',
301 [
302 'label' => __( 'Animation Style', 'wpdirectorykit' ),
303 'type' => \Elementor\Controls_Manager::SELECT,
304 'default' => 'fade',
305 'options' => [
306 'slide' => __( 'Slide', 'wpdirectorykit' ),
307 'fade' => __( 'Fade', 'wpdirectorykit' ),
308 'fade_in_in' => __( 'Fade in', 'wpdirectorykit' ),
309 ],
310 ]
311 );
312
313 $this->add_control(
314 'layout_carousel_cssease',
315 [
316 'label' => __( 'cssEase', 'wpdirectorykit' ),
317 'type' => \Elementor\Controls_Manager::SELECT,
318 'default' => 'linear',
319 'options' => [
320 'linear' => __( 'linear', 'wpdirectorykit' ),
321 'ease' => __( 'ease', 'wpdirectorykit' ),
322 'ease-in' => __( 'ease-in', 'wpdirectorykit' ),
323 'ease-out' => __( 'ease-out', 'wpdirectorykit' ),
324 'ease-in-out' => __( 'ease-in-out', 'wpdirectorykit' ),
325 'step-start' => __( 'step-start', 'wpdirectorykit' ),
326 'step-end' => __( 'step-end', 'wpdirectorykit' ),
327 ],
328 ]
329 );
330
331 $this->add_control(
332 'layout_carousel_columns',
333 [
334 'label' => __( 'Count grid', 'wpdirectorykit' ),
335 'type' => \Elementor\Controls_Manager::NUMBER,
336 'min' => 1,
337 'max' => 10,
338 'step' => 1,
339 'default' => 1,
340 ]
341 );
342
343 $this->end_controls_section();
344
345 }
346
347 private function generate_controls_styles() {
348 $this->start_controls_section(
349 'styles_thmbn_type',
350 [
351 'label' => esc_html__('Thumbnail', 'wpdirectorykit'),
352 'tab' => Controls_Manager::TAB_STYLE,
353 ]
354 );
355
356 $this->add_control(
357 'layout_image_design',
358 [
359 'label' => __( 'Size style thumbnail', 'wpdirectorykit' ),
360 'type' => \Elementor\Controls_Manager::SELECT,
361 'default' => 'none',
362 'options' => [
363 'none' => __( 'None', 'wpdirectorykit' ),
364 'contain' => __( 'Contain', 'wpdirectorykit' ),
365 'cover' => __( 'Cover', 'wpdirectorykit' ),
366 ],
367 'selectors' => [
368 '{{WRAPPER}} .wdk_listing_slider_box .wdk-listing-image' => 'object-fit: {{VALUE}}',
369 ],
370 ]
371 );
372
373 $selectors = array(
374 'normal' => '{{WRAPPER}} .wdk_listing_slider_box .wdk-listing-image',
375 );
376 $this->generate_renders_tabs($selectors, 'layout_image_dynamic', 'block');
377
378 $this->add_control(
379 'enable_fixed_height',
380 [
381 'label' => __( 'Fixed Height', 'wpdirectorykit' ),
382 'type' => \Elementor\Controls_Manager::SWITCHER,
383 'label_on' => __( 'True', 'wpdirectorykit' ),
384 'label_off' => __( 'False', 'wpdirectorykit' ),
385 'return_value' => 'yes',
386 'default' => 'yes',
387 ]
388 );
389
390 $this->add_responsive_control (
391 'styles_thmbn_des_height',
392 [
393 'label' => esc_html__('Height', 'wpdirectorykit'),
394 'type' => Controls_Manager::SLIDER,
395 'range' => [
396 'px' => [
397 'min' => 100,
398 'max' => 1500,
399 ],
400 'vw' => [
401 'min' => 0,
402 'max' => 100,
403 ],
404 ],
405 'size_units' => [ 'px', 'vw' ],
406 'default' => [
407 'size' => 350,
408 'unit' => 'px',
409 ],
410 'selectors' => [
411 '{{WRAPPER}} .wdk_listing_slider_box .wdk-listing-image' => 'height: {{SIZE}}{{UNIT}}',
412 ],
413 'separator' => 'after',
414 ]
415 );
416
417 $this->end_controls_section();
418
419 $this->start_controls_section(
420 'styles_thmbn_nav_section',
421 [
422 'label' => esc_html__('Thumbnail Navs', 'wpdirectorykit'),
423 'tab' => Controls_Manager::TAB_STYLE,
424 ]
425 );
426
427 $this->add_responsive_control(
428 'styles_thmbn_nav_section_hide',
429 [
430 'label' => esc_html__( 'Hide Element', 'wpdirectorykit' ),
431 'type' => Controls_Manager::SWITCHER,
432 'none' => esc_html__( 'Hide', 'wpdirectorykit' ),
433 'block' => esc_html__( 'Show', 'wpdirectorykit' ),
434 'return_value' => 'none',
435 'default' => '',
436 'selectors' => [
437 '{{WRAPPER}} .banner-thumbs' => 'display: {{VALUE}};',
438 ],
439 ]
440 );
441
442
443 $this->add_responsive_control(
444 'styles_thmbn_nav_columns',
445 [
446 'label' => __( 'Count grid', 'wpdirectorykit' ),
447 'type' => \Elementor\Controls_Manager::NUMBER,
448 'min' => 1,
449 'max' => 10,
450 'step' => 1,
451 'default' => 4,
452 ]
453 );
454
455
456 $selectors = array(
457 'normal' => '{{WRAPPER}} .banner-thumbs .banner-thumb',
458 'hover' => '{{WRAPPER}} .banner-thumbs .banner-thumb%1$s,{{WRAPPER}} .wdk-listing-slider .banner-thumbs-con .banner-thumbs .slick-slide.slick-current.slick-active .banner-thumb',
459 );
460 $this->generate_renders_tabs($selectors, 'layout_image_nav_dynamic', ['border','background','padding','border_radius']);
461
462 $this->add_responsive_control(
463 'styles_thmbn_nav_mask_header',
464 [
465 'label' => esc_html__('Mask', 'wpdirectorykit'),
466 'type' => Controls_Manager::HEADING,
467 'separator' => 'before',
468 ]
469 );
470 $selectors = array(
471 'normal' => '{{WRAPPER}} .wdk-listing-slider .banner-thumbs-con .banner-thumbs .banner-thumb::before',
472 );
473 $this->generate_renders_tabs($selectors, 'styles_thmbn_nav_mask', ['background']);
474
475 $this->add_control(
476 'styles_thmbn_nav_mask_hr',
477 [
478 'type' => \Elementor\Controls_Manager::DIVIDER,
479 ]
480 );
481
482 $this->add_responsive_control (
483 'styles_thmbn_nav_height',
484 [
485 'label' => esc_html__('Height', 'wpdirectorykit'),
486 'type' => Controls_Manager::SLIDER,
487 'range' => [
488 'px' => [
489 'min' => 100,
490 'max' => 1500,
491 ],
492 'vw' => [
493 'min' => 0,
494 'max' => 100,
495 ],
496 ],
497 'size_units' => [ 'px', 'vw' ],
498 'default' => [
499 'size' => 80,
500 'unit' => 'px',
501 ],
502 'selectors' => [
503 '{{WRAPPER}} .banner-thumbs .banner-thumb' => 'height: {{SIZE}}{{UNIT}}',
504 ],
505 'separator' => 'after',
506 ]
507 );
508
509 $this->add_responsive_control(
510 'styles_thmbn_nav_box',
511 [
512 'label' => esc_html__('Nav container', 'wpdirectorykit'),
513 'type' => Controls_Manager::HEADING,
514 'separator' => 'before',
515 ]
516 );
517 $selectors = array(
518 'normal' => '{{WRAPPER}} .wdk-listing-slider .banner-thumbs-con',
519 );
520 $this->generate_renders_tabs($selectors, 'styles_thmbn_nav_box_styles', ['margin']);
521
522 $this->end_controls_section();
523
524 $items = [
525 [
526 'key'=>'card',
527 'label'=> esc_html__('Slide', 'wpdirectorykit'),
528 'selector'=>'.wdk_listing_slider_box .wdk-listing-image-card',
529 'selector_hover'=>'.wdk_listing_slider_box .wdk-listing-image-card%1$s',
530 'options'=>'block',
531 ],
532 ];
533
534 foreach ($items as $item) {
535 $this->start_controls_section(
536 $item['key'].'_section',
537 [
538 'label' => $item['label'],
539 'tab' => '1',
540 ]
541 );
542
543 $selectors = array(
544 'normal' => '{{WRAPPER}} '.$item['selector'],
545 'hover'=>'{{WRAPPER}} '.$item['selector_hover'],
546 );
547 $this->generate_renders_tabs($selectors, $item['key'].'_dynamic', $item['options']);
548
549 $this->end_controls_section();
550 }
551
552
553 $this->start_controls_section(
554 'styles_carousel_arrows_section',
555 [
556 'label' => esc_html__('Carousel Arrows', 'wpdirectorykit'),
557 'tab' => '1',
558 ]
559 );
560
561 $this->add_responsive_control(
562 'styles_carousel_arrows_hide',
563 [
564 'label' => esc_html__( 'Hide Element', 'wpdirectorykit' ),
565 'type' => Controls_Manager::SWITCHER,
566 'none' => esc_html__( 'Hide', 'wpdirectorykit' ),
567 'block' => esc_html__( 'Show', 'wpdirectorykit' ),
568 'return_value' => 'none',
569 'default' => '',
570 'selectors' => [
571 '{{WRAPPER}} .wdk-listing-slider .wdk-listing-slider_arrows' => 'display: {{VALUE}};',
572 ],
573 ]
574 );
575
576 $this->add_responsive_control(
577 'styles_carousel_arrows_position',
578 [
579 'label' => __( 'Position', 'wpdirectorykit' ),
580 'type' => \Elementor\Controls_Manager::SELECT,
581 'default' => 'wdk-listing-slider_arrows_bottom',
582 'options' => [
583 'wdk-listing-slider_arrows_bottom' => __( 'Bottom', 'wpdirectorykit' ),
584 'wdk-listing-slider_arrows_middle' => __( 'Center', 'wpdirectorykit' ),
585 'wdk-listing-slider_arrows_top' => __( 'Top', 'wpdirectorykit' ),
586 ],
587 ]
588 );
589
590 $this->add_responsive_control(
591 'styles_carousel_arrows_position_style',
592 [
593 'label' => __( 'Position Style', 'wpdirectorykit' ),
594 'type' => \Elementor\Controls_Manager::SELECT,
595 'default' => 'wdk-listing-slider_arrows_out',
596 'options' => [
597 'wdk-listing-slider_arrows_out' => __( 'Out', 'wpdirectorykit' ),
598 'wdk-listing-slider_arrows_in' => __( 'In', 'wpdirectorykit' ),
599 ],
600 ]
601 );
602
603 $this->add_responsive_control(
604 'styles_carousel_arrows_align',
605 [
606 'label' => __( 'Align', 'wpdirectorykit' ),
607 'type' => Controls_Manager::CHOOSE,
608 'options' => [
609 'left' => [
610 'title' => esc_html__( 'Left', 'wpdirectorykit' ),
611 'icon' => 'eicon-text-align-left',
612 ],
613 'center' => [
614 'title' => esc_html__( 'Center', 'wpdirectorykit' ),
615 'icon' => 'eicon-text-align-center',
616 ],
617 'right' => [
618 'title' => esc_html__( 'Right', 'wpdirectorykit' ),
619 'icon' => 'eicon-text-align-right',
620 ],
621 'justify' => [
622 'title' => esc_html__( 'Justified', 'wpdirectorykit' ),
623 'icon' => 'eicon-text-align-justify',
624 ],
625 ],
626 'render_type' => 'ui',
627 'selectors_dictionary' => [
628 'left' => 'justify-content: flex-start;',
629 'center' => 'justify-content: center;',
630 'right' => 'justify-content: flex-end;',
631 'justify' => 'justify-content: space-between;',
632 ],
633 'selectors' => [
634 '{{WRAPPER}} .wdk-listing-slider .wdk-listing-slider_arrows' => '{{VALUE}};',
635 ],
636 ]
637 );
638
639 $this->add_responsive_control(
640 'styles_carousel_arrows_icon_left_h',
641 [
642 'label' => esc_html__('Arrow left', 'wpdirectorykit'),
643 'type' => Controls_Manager::HEADING,
644 'separator' => 'before',
645 ]
646 );
647 $selectors = array(
648 'normal' => '{{WRAPPER}} .wdk-listing-slider .wdk-listing-slider_arrows .wdk-listing-slider_arrow.wdk_prev',
649 );
650 $this->generate_renders_tabs($selectors, 'styles_carousel_arrows_s_m_left', ['margin']);
651
652 $this->add_responsive_control(
653 'styles_carousel_arrows_icon_left',
654 [
655 'label' => esc_html__('Icon', 'wpdirectorykit'),
656 'type' => Controls_Manager::ICONS,
657 'label_block' => true,
658 'default' => [
659 'value' => 'fa fa-angle-left',
660 'library' => 'solid',
661 ],
662 ]
663 );
664
665 $this->add_responsive_control(
666 'styles_carousel_arrows_icon_right_h',
667 [
668 'label' => esc_html__('Arrow right', 'wpdirectorykit'),
669 'type' => Controls_Manager::HEADING,
670 'separator' => 'before',
671 ]
672 );
673 $selectors = array(
674 'normal' => '{{WRAPPER}} .wdk-listing-slider .wdk-listing-slider_arrows .wdk-listing-slider_arrow.wdk_next',
675 );
676 $this->generate_renders_tabs($selectors, 'styles_carousel_arrows_s_m_next', ['margin']);
677
678 $this->add_responsive_control(
679 'styles_carousel_arrows_icon_right',
680 [
681 'label' => esc_html__('Icon', 'wpdirectorykit'),
682 'type' => Controls_Manager::ICONS,
683 'label_block' => true,
684 'default' => [
685 'value' => 'fa fa-angle-right',
686 'library' => 'solid',
687 ],
688 ]
689 );
690
691 $selectors = array(
692 'normal' => '{{WRAPPER}} .wdk-listing-slider .wdk-listing-slider_arrows .wdk-listing-slider_arrow',
693 'hover'=>'{{WRAPPER}} .wdk-listing-slider .wdk-listing-slider_arrows .wdk-listing-slider_arrow%1$s'
694 );
695 $this->generate_renders_tabs($selectors, 'styles_carousel_arrows_dynamic', ['typo','color','background','border','border_radius','padding','shadow','transition']);
696
697 $this->end_controls_section();
698
699 $this->start_controls_section(
700 'styles_carousel_dots_section',
701 [
702 'label' => esc_html__('Section Dots', 'wpdirectorykit'),
703 'tab' => '1',
704 ]
705 );
706
707 $this->add_responsive_control(
708 'styles_carousel_dots_hide',
709 [
710 'label' => esc_html__( 'Hide Element', 'wpdirectorykit' ),
711 'type' => Controls_Manager::SWITCHER,
712 'none' => esc_html__( 'Hide', 'wpdirectorykit' ),
713 'block' => esc_html__( 'Show', 'wpdirectorykit' ),
714 'return_value' => 'none',
715 'default' => '',
716 'selectors' => [
717 '{{WRAPPER}} .wdk-listing-slider .slick-dots' => 'display: {{VALUE}} !important;',
718 ],
719 ]
720 );
721
722 $this->add_responsive_control(
723 'styles_carousel_dots_position_style',
724 [
725 'label' => __( 'Position Style', 'wpdirectorykit' ),
726 'type' => \Elementor\Controls_Manager::SELECT,
727 'default' => 'wdk-listing-slider_dots_out',
728 'options' => [
729 'wdk-listing-slider_dots_out' => __( 'Out', 'wpdirectorykit' ),
730 'wdk-listing-slider_dots_in' => __( 'In', 'wpdirectorykit' ),
731 ],
732 ]
733 );
734
735 $this->add_responsive_control(
736 'styles_carousel_dots_align',
737 [
738 'label' => __( 'Position', 'wpdirectorykit' ),
739 'type' => Controls_Manager::CHOOSE,
740 'options' => [
741 'left' => [
742 'title' => esc_html__( 'Left', 'wpdirectorykit' ),
743 'icon' => 'eicon-text-align-left',
744 ],
745 'center' => [
746 'title' => esc_html__( 'Center', 'wpdirectorykit' ),
747 'icon' => 'eicon-text-align-center',
748 ],
749 'right' => [
750 'title' => esc_html__( 'Right', 'wpdirectorykit' ),
751 'icon' => 'eicon-text-align-right',
752 ],
753 'justify' => [
754 'title' => esc_html__( 'Justified', 'wpdirectorykit' ),
755 'icon' => 'eicon-text-align-justify',
756 ],
757 ],
758 'render_type' => 'ui',
759 'selectors_dictionary' => [
760 'left' => 'justify-content: flex-start;',
761 'center' => 'justify-content: center;',
762 'right' => 'justify-content: flex-end;',
763 'justify' => 'justify-content: space-between;',
764 ],
765 'selectors' => [
766 '{{WRAPPER}} .wdk-listing-slider .slick-dots' => '{{VALUE}};',
767 ],
768 ]
769 );
770
771 $this->add_responsive_control(
772 'styles_carousel_dots_icon',
773 [
774 'label' => esc_html__('Icon', 'wpdirectorykit'),
775 'type' => Controls_Manager::ICONS,
776 'label_block' => true,
777 'default' => [
778 'value' => 'fas fa-circle',
779 'library' => 'solid',
780 ],
781 ]
782 );
783
784 $selectors = array(
785 'normal' => '{{WRAPPER}} .wdk-listing-slider .slick-dots li .wdk_dot',
786 'hover'=>'{{WRAPPER}} .wdk-listing-slider .slick-dots li .wdk_dot%1$s'
787 );
788 $this->generate_renders_tabs($selectors, 'styles_carousel_dots_dynamic', 'full', ['align']);
789
790 $this->end_controls_section();
791 }
792
793 private function generate_controls_content() {
794
795 }
796
797 public function enqueue_styles_scripts() {
798 wp_enqueue_style('wdk-listing-slider');
799 wp_enqueue_style('slick');
800 wp_enqueue_style('slick-theme');
801 wp_enqueue_script('slick');
802
803 wp_enqueue_style('wdk-notify');
804 wp_enqueue_script('wdk-notify');
805
806 wp_enqueue_style('blueimp-gallery');
807 wp_enqueue_script('blueimp-gallery');
808 wp_enqueue_script('wdk-blueimp-gallery');
809 }
810 }
811