PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.1.16
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.1.16
4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 All 146 releases
ultimate-post-kit / traits / global-widget-controls.php

global-widget-controls.php in Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets 4.1.16, at traits/global-widget-controls.php

2,351 lines 54.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UltimatePostKit\Traits;
4
5 use Elementor\Controls_Manager;
6 use Elementor\Group_Control_Border;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Group_Control_Background;
9 use Elementor\Group_Control_Box_Shadow;
10
11 defined('ABSPATH') || die();
12
13 trait Global_Widget_Controls {
14
15 /**
16 * Link open in a new tab
17 */
18 protected function register_upk_link_new_tab_controls() {
19 $this->add_control(
20 'upk_link_new_tab',
21 [
22 'label' => esc_html__( 'Link Open in a New Tab', 'ultimate-post-kit' ),
23 'type' => Controls_Manager::SWITCHER,
24 'separator' => 'before',
25 'frontend_available' => true,
26 ]
27 );
28 }
29
30 /**
31 * Register Ajax Load More controls
32 */
33 protected function register_ajax_loadmore_controls() {
34 $this->add_control(
35 'ajax_loadmore_enable',
36 [
37 'label' => esc_html__('Ajax Load More', 'ultimate-post-kit') . BDTUPK_NC . BDTUPK_PC,
38 'type' => Controls_Manager::SWITCHER,
39 'separator' => 'before',
40 'condition' => [
41 'show_pagination!' => 'yes',
42 ],
43 'classes' => BDTUPK_IS_PC
44 ]
45 );
46 $this->add_control(
47 'ajax_loadmore_items',
48 [
49 'label' => esc_html__('Load More Items', 'ultimate-post-kit'),
50 'type' => Controls_Manager::NUMBER,
51 'default' => 3,
52 'condition' => [
53 'show_pagination!' => 'yes',
54 'ajax_loadmore_enable' => 'yes',
55 ],
56 ]
57 );
58 $this->add_control(
59 'ajax_loadmore_btn',
60 [
61 'label' => esc_html__('Load More Button', 'ultimate-post-kit'),
62 'type' => Controls_Manager::SWITCHER,
63 'condition' => [
64 'show_pagination!' => 'yes',
65 'ajax_loadmore_enable' => 'yes',
66 ],
67 'default' => 'yes',
68 ]
69 );
70
71 $this->add_control(
72 'ajax_loadmore_infinite_scroll',
73 [
74 'label' => esc_html__('Infinite Scroll', 'ultimate-post-kit'),
75 'type' => Controls_Manager::SWITCHER,
76 'condition' => [
77 'show_pagination!' => 'yes',
78 'ajax_loadmore_enable' => 'yes',
79 'ajax_loadmore_btn!' => 'yes',
80 ],
81 ]
82 );
83 }
84
85 /**
86 * Register Ajax loadmore style controls
87 */
88 protected function register_ajax_loadmore_style_controls() {
89 $this->start_controls_section(
90 'section_style_loadmore',
91 [
92 'label' => esc_html__('Load More', 'ultimate-post-kit'),
93 'tab' => Controls_Manager::TAB_STYLE,
94 'condition' => [
95 'ajax_loadmore_enable' => 'yes',
96 'ajax_loadmore_btn' => 'yes',
97 ],
98 ]
99 );
100
101 $this->start_controls_tabs('tabs_load_button_style');
102
103 $this->start_controls_tab(
104 'tab_load_button_normal',
105 [
106 'label' => esc_html__('Normal', 'ultimate-post-kit'),
107 ]
108 );
109
110 $this->add_control(
111 'load_button_color',
112 [
113 'label' => esc_html__('Color', 'ultimate-post-kit'),
114 'type' => Controls_Manager::COLOR,
115 'selectors' => [
116 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn' => 'color: {{VALUE}};',
117 ],
118 ]
119 );
120
121 $this->add_control(
122 'load_button_background',
123 [
124 'label' => esc_html__('Background', 'ultimate-post-kit'),
125 'type' => Controls_Manager::COLOR,
126 'selectors' => [
127 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn' => 'background-color: {{VALUE}};',
128 ],
129 ]
130 );
131
132 $this->add_group_control(
133 Group_Control_Border::get_type(),
134 [
135 'name' => 'load_button_border',
136 'selector' => '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn',
137 ]
138 );
139
140 $this->add_responsive_control(
141 'load_button_border_radius',
142 [
143 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
144 'type' => Controls_Manager::DIMENSIONS,
145 'size_units' => ['px', '%'],
146 'selectors' => [
147 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
148 ],
149 ]
150 );
151
152 $this->add_group_control(
153 Group_Control_Box_Shadow::get_type(),
154 [
155 'name' => 'load_button_shadow',
156 'selector' => '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn',
157 ]
158 );
159
160 $this->add_responsive_control(
161 'load_button_padding',
162 [
163 'label' => esc_html__('Padding', 'ultimate-post-kit'),
164 'type' => Controls_Manager::DIMENSIONS,
165 'size_units' => ['px', 'em', '%'],
166 'selectors' => [
167 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
168 ],
169 'separator' => 'before',
170 ]
171 );
172 $this->add_group_control(
173 Group_Control_Typography::get_type(),
174 [
175 'name' => 'load_button_typography',
176 'label' => esc_html__('Typography', 'ultimate-post-kit'),
177 'selector' => '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn',
178 ]
179 );
180
181 $this->add_responsive_control(
182 'load_button_top_spacing',
183 [
184 'label' => __('Top Spacing', 'ultimate-post-kit'),
185 'type' => Controls_Manager::SLIDER,
186 'size_units' => ['px'],
187 'selectors' => [
188 '{{WRAPPER}} .upk-loadmore-container' => 'margin-top: {{SIZE}}{{UNIT}};',
189 ],
190 'separator' => 'before',
191 ]
192 );
193 $this->end_controls_tab();
194
195 $this->start_controls_tab(
196 'tab_load_button_hover',
197 [
198 'label' => esc_html__('Hover', 'ultimate-post-kit'),
199 ]
200 );
201
202 $this->add_control(
203 'load_button_hover_color',
204 [
205 'label' => esc_html__('Text Color', 'ultimate-post-kit'),
206 'type' => Controls_Manager::COLOR,
207 'selectors' => [
208 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn:hover' => 'color: {{VALUE}};',
209 ],
210 ]
211 );
212
213 $this->add_control(
214 'load_button_hover_background',
215 [
216 'label' => esc_html__('Background Color', 'ultimate-post-kit'),
217 'type' => Controls_Manager::COLOR,
218 'selectors' => [
219 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn:hover' => 'background-color: {{VALUE}};',
220 ],
221 ]
222 );
223
224 $this->add_control(
225 'load_button_hover_border_color',
226 [
227 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
228 'type' => Controls_Manager::COLOR,
229 'condition' => [
230 'load_button_border_border!' => '',
231 ],
232 'selectors' => [
233 '{{WRAPPER}} .upk-loadmore-container .upk-loadmore-btn:hover' => 'border-color: {{VALUE}};',
234 ],
235 ]
236 );
237
238 $this->end_controls_tab();
239 $this->end_controls_tabs();
240 $this->end_controls_section();
241 }
242
243 /**
244 * Register Group of pagination controls
245 */
246 protected function register_pagination_controls() {
247
248 $this->start_controls_section(
249 'section_style_pagination',
250 [
251 'label' => esc_html__('Pagination', 'ultimate-post-kit'),
252 'tab' => Controls_Manager::TAB_STYLE,
253 'condition' => [
254 'show_pagination' => 'yes',
255 ],
256 ]
257 );
258
259 $this->add_responsive_control(
260 'pagination_alignment',
261 [
262 'label' => __('Alignment', 'ultimate-post-kit'),
263 'type' => Controls_Manager::CHOOSE,
264 'options' => [
265 'left' => [
266 'title' => __('Left', 'ultimate-post-kit'),
267 'icon' => 'eicon-text-align-left',
268 ],
269 'center' => [
270 'title' => __('Center', 'ultimate-post-kit'),
271 'icon' => 'eicon-text-align-center',
272 ],
273 'flex-end' => [
274 'title' => __('Right', 'ultimate-post-kit'),
275 'icon' => 'eicon-text-align-right',
276 ],
277 ],
278 'selectors' => [
279 '{{WRAPPER}} .ep-pagination .upk-pagination' => 'justify-content: {{VALUE}};',
280 ],
281 ]
282 );
283
284 $this->start_controls_tabs('tabs_pagination_style');
285
286 $this->start_controls_tab(
287 'tab_pagination_normal',
288 [
289 'label' => esc_html__('Normal', 'ultimate-post-kit'),
290 ]
291 );
292
293 $this->add_control(
294 'pagination_color',
295 [
296 'label' => esc_html__('Color', 'ultimate-post-kit'),
297 'type' => Controls_Manager::COLOR,
298 'selectors' => [
299 '{{WRAPPER}} ul.upk-pagination li a, {{WRAPPER}} ul.upk-pagination li span' => 'color: {{VALUE}};',
300 ],
301 ]
302 );
303
304 $this->add_group_control(
305 Group_Control_Background::get_type(),
306 [
307 'name' => 'pagination_background',
308 'selector' => '{{WRAPPER}} ul.upk-pagination li a',
309 ]
310 );
311
312 $this->add_group_control(
313 Group_Control_Border::get_type(),
314 [
315 'name' => 'pagination_border',
316 'label' => esc_html__('Border', 'ultimate-post-kit'),
317 'selector' => '{{WRAPPER}} ul.upk-pagination li a',
318 ]
319 );
320
321 $this->add_responsive_control(
322 'pagination_radius',
323 [
324 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
325 'type' => Controls_Manager::DIMENSIONS,
326 'selectors' => [
327 '{{WRAPPER}} ul.upk-pagination li a' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
328 ],
329 ]
330 );
331
332 $this->add_responsive_control(
333 'pagination_padding',
334 [
335 'label' => esc_html__('Padding', 'ultimate-post-kit'),
336 'type' => Controls_Manager::DIMENSIONS,
337 'selectors' => [
338 '{{WRAPPER}} ul.upk-pagination li a' => 'padding: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
339 ],
340 ]
341 );
342
343 $this->add_responsive_control(
344 'pagination_offset',
345 [
346 'label' => esc_html__('Offset', 'ultimate-post-kit'),
347 'type' => Controls_Manager::SLIDER,
348 'selectors' => [
349 '{{WRAPPER}} .upk-pagination' => 'margin-top: {{SIZE}}px;',
350 ],
351 ]
352 );
353
354 $this->add_responsive_control(
355 'pagination_space',
356 [
357 'label' => esc_html__('Spacing', 'ultimate-post-kit'),
358 'type' => Controls_Manager::SLIDER,
359 'selectors' => [
360 '{{WRAPPER}} .upk-pagination' => 'margin-left: -{{SIZE}}px;',
361 '{{WRAPPER}} .upk-pagination > *' => 'padding-left: {{SIZE}}px;',
362 ],
363 ]
364 );
365
366 $this->add_responsive_control(
367 'pagination_arrow_size',
368 [
369 'label' => esc_html__('Arrow Size', 'ultimate-post-kit'),
370 'type' => Controls_Manager::SLIDER,
371 'selectors' => [
372 '{{WRAPPER}} ul.upk-pagination li a i' => 'font-size: {{SIZE}}px;',
373 ],
374 ]
375 );
376
377 $this->add_group_control(
378 Group_Control_Typography::get_type(),
379 [
380 'name' => 'pagination_typography',
381 'label' => esc_html__('Typography', 'ultimate-post-kit'),
382 'selector' => '{{WRAPPER}} ul.upk-pagination li a, {{WRAPPER}} ul.upk-pagination li span',
383 ]
384 );
385
386 $this->end_controls_tab();
387
388 $this->start_controls_tab(
389 'tab_pagination_hover',
390 [
391 'label' => esc_html__('Hover', 'ultimate-post-kit'),
392 ]
393 );
394
395 $this->add_control(
396 'pagination_hover_color',
397 [
398 'label' => esc_html__('Color', 'ultimate-post-kit'),
399 'type' => Controls_Manager::COLOR,
400 'selectors' => [
401 '{{WRAPPER}} ul.upk-pagination li a:hover' => 'color: {{VALUE}};',
402 ],
403 ]
404 );
405
406 $this->add_control(
407 'pagination_hover_border_color',
408 [
409 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
410 'type' => Controls_Manager::COLOR,
411 'selectors' => [
412 '{{WRAPPER}} ul.upk-pagination li a:hover' => 'border-color: {{VALUE}};',
413 ],
414 'condition' => [
415 'pagination_border_border!' => ''
416 ]
417 ]
418 );
419
420 $this->add_group_control(
421 Group_Control_Background::get_type(),
422 [
423 'name' => 'pagination_hover_background',
424 'types' => ['classic', 'gradient'],
425 'selector' => '{{WRAPPER}} ul.upk-pagination li a:hover',
426 ]
427 );
428
429 $this->end_controls_tab();
430
431 $this->start_controls_tab(
432 'tab_pagination_active',
433 [
434 'label' => esc_html__('Active', 'ultimate-post-kit'),
435 ]
436 );
437
438 $this->add_control(
439 'pagination_active_color',
440 [
441 'label' => esc_html__('Color', 'ultimate-post-kit'),
442 'type' => Controls_Manager::COLOR,
443 'selectors' => [
444 '{{WRAPPER}} ul.upk-pagination li.upk-active a' => 'color: {{VALUE}};',
445 ],
446 ]
447 );
448
449 $this->add_control(
450 'pagination_active_border_color',
451 [
452 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
453 'type' => Controls_Manager::COLOR,
454 'selectors' => [
455 '{{WRAPPER}} ul.upk-pagination li.upk-active a' => 'border-color: {{VALUE}};',
456 ],
457 'condition' => [
458 'pagination_border_border!' => ''
459 ]
460 ]
461 );
462
463 $this->add_group_control(
464 Group_Control_Background::get_type(),
465 [
466 'name' => 'pagination_active_background',
467 'selector' => '{{WRAPPER}} ul.upk-pagination li.upk-active a',
468 ]
469 );
470
471 $this->end_controls_tab();
472
473 $this->end_controls_tabs();
474
475 $this->end_controls_section();
476 }
477
478 /**
479 * Register Group of Date controls
480 */
481 protected function register_date_controls() {
482
483 $this->add_control(
484 'show_date',
485 [
486 'label' => esc_html__('Date', 'ultimate-post-kit'),
487 'type' => Controls_Manager::SWITCHER,
488 'default' => 'yes',
489 'separator' => 'before'
490 ]
491 );
492
493 $this->add_control(
494 'human_diff_time',
495 [
496 'label' => esc_html__('Human Different Time', 'ultimate-post-kit'),
497 'type' => Controls_Manager::SWITCHER,
498 'condition' => [
499 'show_date' => 'yes'
500 ]
501 ]
502 );
503
504 $this->add_control(
505 'human_diff_time_short',
506 [
507 'label' => esc_html__('Time Short Format', 'ultimate-post-kit'),
508 'description' => esc_html__('This will work for Hours, Minute and Seconds', 'ultimate-post-kit'),
509 'type' => Controls_Manager::SWITCHER,
510 'condition' => [
511 'human_diff_time' => 'yes',
512 'show_date' => 'yes'
513 ]
514 ]
515 );
516
517 $this->add_control(
518 'show_time',
519 [
520 'label' => esc_html__('Show Time', 'ultimate-post-kit'),
521 'type' => Controls_Manager::SWITCHER,
522 'condition' => [
523 'human_diff_time' => '',
524 'show_date' => 'yes'
525 ]
526 ]
527 );
528 }
529
530 /**
531 * Register Reading Time controls
532 */
533 protected function register_reading_time_controls() {
534
535 $this->add_control(
536 'show_reading_time',
537 [
538 'label' => esc_html__('Reading Time', 'ultimate-post-kit') . BDTUPK_PC,
539 'type' => Controls_Manager::SWITCHER,
540 'separator' => 'before',
541 'classes' => BDTUPK_IS_PC
542 ]
543 );
544 $this->add_control(
545 'avg_reading_speed',
546 [
547 'label' => esc_html__('Reading Speed', 'ultimate-post-kit'),
548 'description' => esc_html__('the average reading speed of most adults is around 200 to 250 words per minute', 'ultimate-post-kit'),
549 'type' => Controls_Manager::NUMBER,
550 'min' => 0,
551 'default' => 200,
552 'condition' => [
553 'show_reading_time' => 'yes'
554 ]
555 ]
556 );
557
558 $this->add_control(
559 'hide_seconds',
560 [
561 'label' => esc_html__('Hide Seconds', 'ultimate-post-kit'),
562 'type' => Controls_Manager::SWITCHER,
563 'condition' => [
564 'show_reading_time' => 'yes'
565 ]
566 ]
567 );
568
569 $this->add_control(
570 'hide_minutes',
571 [
572 'label' => esc_html__('Hide Minutes', 'ultimate-post-kit'),
573 'type' => Controls_Manager::SWITCHER,
574 'condition' => [
575 'show_reading_time' => 'yes'
576 ]
577 ]
578 );
579
580 /**
581 * Global upk_link_new_tab control
582 */
583 $this->register_upk_link_new_tab_controls();
584 $this->add_control(
585 'hr_link',
586 [
587 'type' => Controls_Manager::DIVIDER,
588 ]
589 );
590 }
591
592 /**
593 * Register Group of Title controls
594 */
595 protected function register_title_controls() {
596
597 $this->add_control(
598 'show_title',
599 [
600 'label' => esc_html__('Title', 'ultimate-post-kit'),
601 'type' => Controls_Manager::SWITCHER,
602 'default' => 'yes',
603 ]
604 );
605
606 $this->add_control(
607 'title_tags',
608 [
609 'label' => __('Title HTML Tag', 'ultimate-post-kit'),
610 'type' => Controls_Manager::SELECT,
611 'default' => 'h3',
612 'options' => ultimate_post_kit_title_tags(),
613 'condition' => [
614 'show_title' => 'yes'
615 ]
616 ]
617 );
618 }
619 /**
620 * Register Group of Text controls
621 */
622 protected function register_text_controls() {
623 $this->add_control(
624 'show_excerpt',
625 [
626 'label' => esc_html__('Show Text', 'ultimate-post-kit'),
627 'type' => Controls_Manager::SWITCHER,
628 'default' => 'yes',
629 'separator' => 'before'
630 ]
631 );
632
633 $this->add_control(
634 'excerpt_length',
635 [
636 'label' => esc_html__('Text Limit', 'ultimate-post-kit'),
637 'description' => esc_html__('It\'s just work for main content, but not working with excerpt. If you set 0 so you will get full main content.', 'ultimate-post-kit'),
638 'type' => Controls_Manager::NUMBER,
639 'default' => 20,
640 'condition' => [
641 'show_excerpt' => 'yes'
642 ],
643 ]
644 );
645
646 $this->add_control(
647 'ellipsis',
648 [
649 'label' => esc_html__('Ellipsis', 'ultimate-post-kit'),
650 'type' => Controls_Manager::TEXT,
651 'condition' => [
652 'show_excerpt' => 'yes',
653 'excerpt_length!' => [0, ''],
654 ],
655 'ai' => [
656 'active' => false,
657 ],
658 ]
659 );
660
661 $this->add_control(
662 'strip_shortcode',
663 [
664 'label' => esc_html__('Strip Shortcode', 'ultimate-post-kit'),
665 'type' => Controls_Manager::SWITCHER,
666 'default' => 'yes',
667 'condition' => [
668 'show_excerpt' => 'yes',
669 ],
670 ]
671 );
672 }
673
674 /**
675 * Register Group of Navigation controls
676 *
677 * @param string $name Widget name.
678 */
679 function register_navigation_controls($name) {
680 $this->start_controls_section(
681 'section_content_navigation',
682 [
683 'label' => __('Navigation', 'ultimate-post-kit'),
684 ]
685 );
686
687 $this->add_control(
688 'navigation',
689 [
690 'label' => __('Navigation', 'ultimate-post-kit'),
691 'type' => Controls_Manager::SELECT,
692 'default' => 'arrows',
693 'options' => [
694 'both' => esc_html__('Arrows and Dots', 'ultimate-post-kit'),
695 'arrows-fraction' => esc_html__('Arrows and Fraction', 'ultimate-post-kit'),
696 'arrows' => esc_html__('Arrows', 'ultimate-post-kit'),
697 'dots' => esc_html__('Dots', 'ultimate-post-kit'),
698 'progressbar' => esc_html__('Progress', 'ultimate-post-kit'),
699 'none' => esc_html__('None', 'ultimate-post-kit'),
700 ],
701 'prefix_class' => 'upk-navigation-type-',
702 'render_type' => 'template',
703 ]
704 );
705
706 $this->add_control(
707 'both_position',
708 [
709 'label' => __('Arrows and Dots Position', 'ultimate-post-kit'),
710 'type' => Controls_Manager::SELECT,
711 'default' => 'center',
712 'options' => ultimate_post_kit_navigation_position(),
713 'condition' => [
714 'navigation' => 'both',
715 ],
716 ]
717 );
718
719 $this->add_control(
720 'arrows_fraction_position',
721 [
722 'label' => __('Arrows and Fraction Position', 'ultimate-post-kit'),
723 'type' => Controls_Manager::SELECT,
724 'default' => 'center',
725 'options' => ultimate_post_kit_navigation_position(),
726 'condition' => [
727 'navigation' => 'arrows-fraction',
728 ],
729 ]
730 );
731
732 $this->add_control(
733 'arrows_position',
734 [
735 'label' => __('Arrows Position', 'ultimate-post-kit'),
736 'type' => Controls_Manager::SELECT,
737 'default' => 'center',
738 'options' => ultimate_post_kit_navigation_position(),
739 'condition' => [
740 'navigation' => 'arrows',
741 ],
742 ]
743 );
744
745 $this->add_control(
746 'dots_position',
747 [
748 'label' => __('Dots Position', 'ultimate-post-kit'),
749 'type' => Controls_Manager::SELECT,
750 'default' => 'bottom-center',
751 'options' => ultimate_post_kit_pagination_position(),
752 'condition' => [
753 'navigation' => 'dots',
754 ],
755
756 ]
757 );
758
759 $this->add_control(
760 'progress_position',
761 [
762 'label' => __('Progress Position', 'ultimate-post-kit'),
763 'type' => Controls_Manager::SELECT,
764 'default' => 'bottom',
765 'options' => [
766 'bottom' => esc_html__('Bottom', 'ultimate-post-kit'),
767 'top' => esc_html__('Top', 'ultimate-post-kit'),
768 ],
769 'condition' => [
770 'navigation' => 'progressbar',
771 ],
772 ]
773 );
774
775 $this->add_control(
776 'dynamic_bullets',
777 [
778 'label' => __('Dynamic Bullets?', 'ultimate-post-kit'),
779 'type' => Controls_Manager::SWITCHER,
780 'condition' => [
781 'navigation' => ['dots', 'both'],
782 ],
783 ]
784 );
785
786 $this->add_control(
787 'show_scrollbar',
788 [
789 'label' => __('Show Scrollbar?', 'ultimate-post-kit'),
790 'type' => Controls_Manager::SWITCHER,
791 ]
792 );
793
794 $this->add_control(
795 'nav_arrows_icon',
796 [
797 'label' => esc_html__('Arrows Icon', 'ultimate-post-kit'),
798 'type' => Controls_Manager::SELECT,
799 'default' => '0',
800 'options' => [
801 '0' => esc_html__('Default', 'ultimate-post-kit'),
802 '1' => esc_html__('Style 1', 'ultimate-post-kit'),
803 '2' => esc_html__('Style 2', 'ultimate-post-kit'),
804 '3' => esc_html__('Style 3', 'ultimate-post-kit'),
805 '4' => esc_html__('Style 4', 'ultimate-post-kit'),
806 '5' => esc_html__('Style 5', 'ultimate-post-kit'),
807 '6' => esc_html__('Style 6', 'ultimate-post-kit'),
808 '7' => esc_html__('Style 7', 'ultimate-post-kit'),
809 '8' => esc_html__('Style 8', 'ultimate-post-kit'),
810 '9' => esc_html__('Style 9', 'ultimate-post-kit'),
811 '10' => esc_html__('Style 10', 'ultimate-post-kit'),
812 '11' => esc_html__('Style 11', 'ultimate-post-kit'),
813 '12' => esc_html__('Style 12', 'ultimate-post-kit'),
814 '13' => esc_html__('Style 13', 'ultimate-post-kit'),
815 '14' => esc_html__('Style 14', 'ultimate-post-kit'),
816 '15' => esc_html__('Style 15', 'ultimate-post-kit'),
817 '16' => esc_html__('Style 16', 'ultimate-post-kit'),
818 '17' => esc_html__('Style 17', 'ultimate-post-kit'),
819 '18' => esc_html__('Style 18', 'ultimate-post-kit'),
820 'circle-1' => esc_html__('Style 19', 'ultimate-post-kit'),
821 'circle-2' => esc_html__('Style 20', 'ultimate-post-kit'),
822 'circle-3' => esc_html__('Style 21', 'ultimate-post-kit'),
823 'circle-4' => esc_html__('Style 22', 'ultimate-post-kit'),
824 'square-1' => esc_html__('Style 23', 'ultimate-post-kit'),
825 ],
826 'condition' => [
827 'navigation' => ['arrows-fraction', 'both', 'arrows'],
828 ],
829 ]
830 );
831
832 $this->add_control(
833 'hide_arrow_on_mobile',
834 [
835 'label' => __('Hide Arrows on Mobile', 'ultimate-post-kit'),
836 'type' => Controls_Manager::SWITCHER,
837 'default' => 'yes',
838 'condition' => [
839 'navigation' => ['arrows-fraction', 'arrows', 'both'],
840 ],
841 ]
842 );
843
844 $this->end_controls_section();
845
846 $this->start_controls_section(
847 'section_carousel_settings',
848 [
849 'label' => __('Carousel Settings', 'ultimate-post-kit'),
850 ]
851 );
852
853 $this->add_control(
854 'direction',
855 [
856 'label' => esc_html__('Direction', 'ultimate-post-kit'),
857 'type' => Controls_Manager::SELECT,
858 'default' => 'horizontal',
859 'options' => [
860 'horizontal' => esc_html__('Horizontal', 'ultimate-post-kit'),
861 'vertical' => esc_html__('Vertical', 'ultimate-post-kit'),
862 ],
863 'render_type' => 'template',
864 ]
865 );
866
867 $this->add_responsive_control(
868 'vertical_height',
869 [
870 'label' => __('Container Height', 'ultimate-post-kit'),
871 'type' => Controls_Manager::SLIDER,
872 'range' => [
873 'px' => [
874 'min' => 200,
875 'max' => 1200,
876 'step' => 10
877 ],
878 ],
879 'default' => [
880 'size' => 900,
881 ],
882 'selectors' => [
883 '{{WRAPPER}} .upk-' . $name . '-carousel .swiper-wrapper' => 'height: {{SIZE}}{{UNIT}};',
884 ],
885 'condition' => [
886 'direction' => 'vertical',
887 ],
888 'render_type' => 'template',
889 ]
890 );
891
892 $this->add_control(
893 'skin',
894 [
895 'label' => esc_html__('Layout', 'ultimate-post-kit'),
896 'type' => Controls_Manager::SELECT,
897 'default' => 'carousel',
898 'options' => [
899 'carousel' => esc_html__('Carousel', 'ultimate-post-kit'),
900 'coverflow' => esc_html__('Coverflow', 'ultimate-post-kit'),
901 ],
902 'prefix_class' => 'upk-carousel-style-',
903 'render_type' => 'template',
904 'separator' => 'before'
905 ]
906 );
907
908 $this->add_control(
909 'coverflow_toggle',
910 [
911 'label' => __('Coverflow Effect', 'ultimate-post-kit'),
912 'type' => Controls_Manager::POPOVER_TOGGLE,
913 'return_value' => 'yes',
914 'condition' => [
915 'skin' => 'coverflow'
916 ]
917 ]
918 );
919
920 $this->start_popover();
921
922 $this->add_control(
923 'coverflow_rotate',
924 [
925 'label' => esc_html__('Rotate', 'ultimate-post-kit'),
926 'type' => Controls_Manager::SLIDER,
927 'default' => [
928 'size' => 50,
929 ],
930 'range' => [
931 'px' => [
932 'min' => -360,
933 'max' => 360,
934 'step' => 5,
935 ],
936 ],
937 'condition' => [
938 'coverflow_toggle' => 'yes'
939 ],
940 'render_type' => 'template',
941 ]
942 );
943
944 $this->add_control(
945 'coverflow_stretch',
946 [
947 'label' => __('Stretch', 'ultimate-post-kit'),
948 'type' => Controls_Manager::SLIDER,
949 'default' => [
950 'size' => 0,
951 ],
952 'range' => [
953 'px' => [
954 'min' => 0,
955 'step' => 10,
956 'max' => 100,
957 ],
958 ],
959 'condition' => [
960 'coverflow_toggle' => 'yes'
961 ],
962 'render_type' => 'template',
963 ]
964 );
965
966 $this->add_control(
967 'coverflow_modifier',
968 [
969 'label' => __('Modifier', 'ultimate-post-kit'),
970 'type' => Controls_Manager::SLIDER,
971 'default' => [
972 'size' => 1,
973 ],
974 'range' => [
975 'px' => [
976 'min' => 1,
977 'step' => 1,
978 'max' => 10,
979 ],
980 ],
981 'condition' => [
982 'coverflow_toggle' => 'yes'
983 ],
984 'render_type' => 'template',
985 ]
986 );
987
988 $this->add_control(
989 'coverflow_depth',
990 [
991 'label' => __('Depth', 'ultimate-post-kit'),
992 'type' => Controls_Manager::SLIDER,
993 'default' => [
994 'size' => 100,
995 ],
996 'range' => [
997 'px' => [
998 'min' => 0,
999 'step' => 10,
1000 'max' => 1000,
1001 ],
1002 ],
1003 'condition' => [
1004 'coverflow_toggle' => 'yes'
1005 ],
1006 'render_type' => 'template',
1007 ]
1008 );
1009
1010 $this->end_popover();
1011
1012 $this->add_control(
1013 'hr_005',
1014 [
1015 'type' => Controls_Manager::DIVIDER,
1016 'condition' => [
1017 'skin' => 'coverflow'
1018 ]
1019 ]
1020 );
1021
1022 $this->add_control(
1023 'autoplay',
1024 [
1025 'label' => __('Autoplay', 'ultimate-post-kit'),
1026 'type' => Controls_Manager::SWITCHER,
1027 'default' => 'yes',
1028
1029 ]
1030 );
1031
1032 $this->add_control(
1033 'autoplay_speed',
1034 [
1035 'label' => esc_html__('Autoplay Speed', 'ultimate-post-kit'),
1036 'type' => Controls_Manager::NUMBER,
1037 'default' => 5000,
1038 'condition' => [
1039 'autoplay' => 'yes',
1040 ],
1041 ]
1042 );
1043
1044 $this->add_control(
1045 'pauseonhover',
1046 [
1047 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'),
1048 'type' => Controls_Manager::SWITCHER,
1049 ]
1050 );
1051
1052 $this->add_responsive_control(
1053 'slides_to_scroll',
1054 [
1055 'type' => Controls_Manager::SELECT,
1056 'label' => esc_html__('Slides to Scroll', 'ultimate-post-kit'),
1057 'default' => 1,
1058 'tablet_default' => 1,
1059 'mobile_default' => 1,
1060 'options' => [
1061 1 => '1',
1062 2 => '2',
1063 3 => '3',
1064 4 => '4',
1065 5 => '5',
1066 6 => '6',
1067 ],
1068 ]
1069 );
1070
1071 $this->add_control(
1072 'centered_slides',
1073 [
1074 'label' => __('Center Slide', 'ultimate-post-kit'),
1075 'description' => __('Use even items from Layout > Columns settings for better preview.', 'ultimate-post-kit'),
1076 'type' => Controls_Manager::SWITCHER,
1077 ]
1078 );
1079
1080 $this->add_control(
1081 'grab_cursor',
1082 [
1083 'label' => __('Grab Cursor', 'ultimate-post-kit'),
1084 'type' => Controls_Manager::SWITCHER,
1085 ]
1086 );
1087
1088 $this->add_control(
1089 'mousewheel',
1090 [
1091 'label' => __('Mousewheel', 'ultimate-post-kit'),
1092 'type' => Controls_Manager::SWITCHER,
1093 ]
1094 );
1095 $this->add_control(
1096 'loop',
1097 [
1098 'label' => __('Loop', 'ultimate-post-kit'),
1099 'type' => Controls_Manager::SWITCHER,
1100 'default' => 'yes',
1101
1102 ]
1103 );
1104
1105
1106 $this->add_control(
1107 'speed',
1108 [
1109 'label' => __('Animation Speed (ms)', 'ultimate-post-kit'),
1110 'type' => Controls_Manager::SLIDER,
1111 'default' => [
1112 'size' => 500,
1113 ],
1114 'range' => [
1115 'px' => [
1116 'min' => 100,
1117 'max' => 5000,
1118 'step' => 50,
1119 ],
1120 ],
1121 ]
1122 );
1123
1124 $this->add_control(
1125 'observer',
1126 [
1127 'label' => __('Observer', 'ultimate-post-kit'),
1128 'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-post-kit'),
1129 'type' => Controls_Manager::SWITCHER,
1130 ]
1131 );
1132
1133 $this->end_controls_section();
1134 }
1135
1136 function register_navigation_style($name) {
1137 $this->start_controls_section(
1138 'section_style_navigation',
1139 [
1140 'label' => __('Navigation', 'ultimate-post-kit'),
1141 'tab' => Controls_Manager::TAB_STYLE,
1142 'conditions' => [
1143 'relation' => 'or',
1144 'terms' => [
1145 [
1146 'name' => 'navigation',
1147 'operator' => '!=',
1148 'value' => 'none',
1149 ],
1150 [
1151 'name' => 'show_scrollbar',
1152 'value' => 'yes',
1153 ],
1154 ],
1155 ],
1156 ]
1157 );
1158
1159 $this->add_control(
1160 'arrows_heading',
1161 [
1162 'label' => __('ARROWS', 'ultimate-post-kit'),
1163 'type' => Controls_Manager::HEADING,
1164 'condition' => [
1165 'navigation!' => ['dots', 'progressbar', 'none'],
1166 ],
1167 ]
1168 );
1169
1170 $this->start_controls_tabs('tabs_navigation_arrows_style');
1171
1172 $this->start_controls_tab(
1173 'tabs_nav_arrows_normal',
1174 [
1175 'label' => __('Normal', 'ultimate-post-kit'),
1176 'condition' => [
1177 'navigation!' => ['dots', 'progressbar', 'none'],
1178 ],
1179 ]
1180 );
1181
1182 $this->add_control(
1183 'arrows_color',
1184 [
1185 'label' => __('Color', 'ultimate-post-kit'),
1186 'type' => Controls_Manager::COLOR,
1187 'selectors' => [
1188 '{{WRAPPER}} .upk-navigation-prev i, {{WRAPPER}} .upk-navigation-next i' => 'color: {{VALUE}}',
1189 ],
1190 'condition' => [
1191 'navigation!' => ['dots', 'progressbar', 'none'],
1192 ],
1193 ]
1194 );
1195
1196 $this->add_control(
1197 'arrows_background',
1198 [
1199 'label' => __('Background', 'ultimate-post-kit'),
1200 'type' => Controls_Manager::COLOR,
1201 'selectors' => [
1202 '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next' => 'background-color: {{VALUE}}',
1203 ],
1204 'condition' => [
1205 'navigation!' => ['dots', 'progressbar', 'none'],
1206 ],
1207 ]
1208 );
1209
1210 $this->add_group_control(
1211 Group_Control_Border::get_type(),
1212 [
1213 'name' => 'nav_arrows_border',
1214 'selector' => '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next',
1215 'condition' => [
1216 'navigation!' => ['dots', 'progressbar', 'none'],
1217 ],
1218 ]
1219 );
1220
1221 $this->add_responsive_control(
1222 'border_radius',
1223 [
1224 'label' => __('Border Radius', 'ultimate-post-kit'),
1225 'type' => Controls_Manager::DIMENSIONS,
1226 'size_units' => ['px', '%'],
1227 'selectors' => [
1228 '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1229 ],
1230 'condition' => [
1231 'navigation!' => ['dots', 'progressbar', 'none'],
1232 ],
1233 ]
1234 );
1235
1236 $this->add_responsive_control(
1237 'arrows_padding',
1238 [
1239 'label' => esc_html__('Padding', 'ultimate-post-kit'),
1240 'type' => Controls_Manager::DIMENSIONS,
1241 'size_units' => ['px', 'em', '%'],
1242 'selectors' => [
1243 '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1244 ],
1245 'condition' => [
1246 'navigation!' => ['dots', 'progressbar', 'none'],
1247 ],
1248 ]
1249 );
1250
1251 $this->add_responsive_control(
1252 'arrows_size',
1253 [
1254 'label' => __('Size', 'ultimate-post-kit'),
1255 'type' => Controls_Manager::SLIDER,
1256 'range' => [
1257 'px' => [
1258 'min' => 10,
1259 'max' => 100,
1260 ],
1261 ],
1262 'selectors' => [
1263 '{{WRAPPER}} .upk-navigation-prev i,
1264 {{WRAPPER}} .upk-navigation-next i' => 'font-size: {{SIZE || 24}}{{UNIT}};',
1265 ],
1266 'condition' => [
1267 'navigation!' => ['dots', 'progressbar', 'none'],
1268 ],
1269 ]
1270 );
1271
1272 $this->add_responsive_control(
1273 'arrows_space',
1274 [
1275 'label' => __('Space Between Arrows', 'ultimate-post-kit'),
1276 'type' => Controls_Manager::SLIDER,
1277 'range' => [
1278 'px' => [
1279 'min' => 0,
1280 'max' => 100,
1281 ],
1282 ],
1283 'selectors' => [
1284 '{{WRAPPER}} .upk-navigation-prev' => 'margin-right: {{SIZE}}px;',
1285 '{{WRAPPER}} .upk-navigation-next' => 'margin-left: {{SIZE}}px;',
1286 ],
1287 'condition' => [
1288 'navigation!' => ['dots', 'progressbar', 'none'],
1289 ],
1290 ]
1291 );
1292
1293 $this->end_controls_tab();
1294
1295 $this->start_controls_tab(
1296 'tabs_nav_arrows_hover',
1297 [
1298 'label' => __('Hover', 'ultimate-post-kit'),
1299 'condition' => [
1300 'navigation!' => ['dots', 'progressbar', 'none'],
1301 ],
1302 ]
1303 );
1304
1305 $this->add_control(
1306 'arrows_hover_color',
1307 [
1308 'label' => __('Color', 'ultimate-post-kit'),
1309 'type' => Controls_Manager::COLOR,
1310 'selectors' => [
1311 '{{WRAPPER}} .upk-navigation-prev:hover i, {{WRAPPER}} .upk-navigation-next:hover i' => 'color: {{VALUE}}',
1312 ],
1313 'condition' => [
1314 'navigation!' => ['dots', 'progressbar', 'none'],
1315 ],
1316 ]
1317 );
1318
1319 $this->add_control(
1320 'arrows_hover_background',
1321 [
1322 'label' => __('Background', 'ultimate-post-kit'),
1323 'type' => Controls_Manager::COLOR,
1324 'selectors' => [
1325 '{{WRAPPER}} .upk-navigation-prev:hover, {{WRAPPER}} .upk-navigation-next:hover' => 'background-color: {{VALUE}}',
1326 ],
1327 'condition' => [
1328 'navigation!' => ['dots', 'progressbar', 'none'],
1329 ],
1330 ]
1331 );
1332
1333 $this->add_control(
1334 'nav_arrows_hover_border_color',
1335 [
1336 'label' => __('Border Color', 'ultimate-post-kit'),
1337 'type' => Controls_Manager::COLOR,
1338 'selectors' => [
1339 '{{WRAPPER}} .upk-navigation-prev:hover, {{WRAPPER}} .upk-navigation-next:hover' => 'border-color: {{VALUE}};',
1340 ],
1341 'condition' => [
1342 'nav_arrows_border_border!' => '',
1343 'navigation!' => ['dots', 'progressbar', 'none'],
1344 ],
1345 ]
1346 );
1347
1348 $this->end_controls_tab();
1349
1350 $this->end_controls_tabs();
1351
1352 $this->add_control(
1353 'hr_1',
1354 [
1355 'type' => Controls_Manager::DIVIDER,
1356 'condition' => [
1357 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1358 ],
1359 ]
1360 );
1361
1362 $this->add_control(
1363 'dots_heading',
1364 [
1365 'label' => __('DOTS', 'ultimate-post-kit'),
1366 'type' => Controls_Manager::HEADING,
1367 'condition' => [
1368 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1369 ],
1370 ]
1371 );
1372
1373 $this->start_controls_tabs('tabs_navigation_dots_style');
1374
1375 $this->start_controls_tab(
1376 'tabs_nav_dots_normal',
1377 [
1378 'label' => __('Normal', 'ultimate-post-kit'),
1379 'condition' => [
1380 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1381 ],
1382 ]
1383 );
1384
1385 $this->add_control(
1386 'dots_color',
1387 [
1388 'label' => __('Color', 'ultimate-post-kit'),
1389 'type' => Controls_Manager::COLOR,
1390 'selectors' => [
1391 '{{WRAPPER}} .swiper-pagination-bullet' => 'background-color: {{VALUE}}',
1392 ],
1393 'condition' => [
1394 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1395 ],
1396 ]
1397 );
1398
1399 $this->add_responsive_control(
1400 'dots_space_between',
1401 [
1402 'label' => __('Space Between', 'ultimate-post-kit'),
1403 'type' => Controls_Manager::SLIDER,
1404 'selectors' => [
1405 '{{WRAPPER}}' => '--upk-swiper-dots-space-between: {{SIZE}}{{UNIT}};',
1406 ],
1407 'condition' => [
1408 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1409 ],
1410 ]
1411 );
1412
1413 $this->add_responsive_control(
1414 'dots_width_size',
1415 [
1416 'label' => __('Width(px)', 'ultimate-post-kit'),
1417 'type' => Controls_Manager::SLIDER,
1418 'range' => [
1419 'px' => [
1420 'min' => 1,
1421 'max' => 50,
1422 ],
1423 ],
1424 'selectors' => [
1425 '{{WRAPPER}} .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};',
1426 ],
1427 'condition' => [
1428 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1429 ],
1430 ]
1431 );
1432
1433 $this->add_responsive_control(
1434 'dots_height_size',
1435 [
1436 'label' => __('Height(px)', 'ultimate-post-kit'),
1437 'type' => Controls_Manager::SLIDER,
1438 'range' => [
1439 'px' => [
1440 'min' => 1,
1441 'max' => 50,
1442 ],
1443 ],
1444 'selectors' => [
1445 '{{WRAPPER}} .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};',
1446 ],
1447 'condition' => [
1448 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1449 ],
1450 ]
1451 );
1452
1453 $this->add_responsive_control(
1454 'dots_border_radius',
1455 [
1456 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
1457 'type' => Controls_Manager::DIMENSIONS,
1458 'size_units' => ['px', '%'],
1459 'selectors' => [
1460 '{{WRAPPER}} .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1461 ],
1462 'condition' => [
1463 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1464 ],
1465 ]
1466 );
1467
1468 $this->add_group_control(
1469 Group_Control_Box_Shadow::get_type(),
1470 [
1471 'name' => 'dots_box_shadow',
1472 'selector' => '{{WRAPPER}} .swiper-pagination-bullet',
1473 'condition' => [
1474 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1475 ],
1476 ]
1477 );
1478
1479 $this->end_controls_tab();
1480
1481 $this->start_controls_tab(
1482 'tabs_nav_dots_active',
1483 [
1484 'label' => __('Active', 'ultimate-post-kit'),
1485 'condition' => [
1486 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1487 ],
1488 ]
1489 );
1490
1491 $this->add_control(
1492 'active_dot_color',
1493 [
1494 'label' => __('Color', 'ultimate-post-kit'),
1495 'type' => Controls_Manager::COLOR,
1496 'selectors' => [
1497 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}',
1498 ],
1499 'condition' => [
1500 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1501 ],
1502 ]
1503 );
1504
1505 $this->add_responsive_control(
1506 'active_advanced_dots_width',
1507 [
1508 'label' => __('Width(px)', 'ultimate-post-kit'),
1509 'type' => Controls_Manager::SLIDER,
1510 'range' => [
1511 'px' => [
1512 'min' => 1,
1513 'max' => 50,
1514 ],
1515 ],
1516 'selectors' => [
1517 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'width: {{SIZE}}{{UNIT}};',
1518 ],
1519 'condition' => [
1520 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1521 ],
1522 ]
1523 );
1524
1525 $this->add_responsive_control(
1526 'active_dots_height',
1527 [
1528 'label' => __('Height(px)', 'ultimate-post-kit'),
1529 'type' => Controls_Manager::SLIDER,
1530 'range' => [
1531 'px' => [
1532 'min' => 1,
1533 'max' => 50,
1534 ],
1535 ],
1536 'selectors' => [
1537 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'height: {{SIZE}}{{UNIT}};',
1538 '{{WRAPPER}}' => '--upk-swiper-dots-active-height: {{SIZE}}{{UNIT}};',
1539 ],
1540 'condition' => [
1541 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1542 ],
1543 ]
1544 );
1545
1546 $this->add_responsive_control(
1547 'active_dots_radius',
1548 [
1549 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
1550 'type' => Controls_Manager::DIMENSIONS,
1551 'size_units' => ['px', '%'],
1552 'selectors' => [
1553 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1554 ],
1555 'condition' => [
1556 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1557 ],
1558 ]
1559 );
1560
1561 $this->add_responsive_control(
1562 'active_dots_align',
1563 [
1564 'label' => __('Alignment', 'ultimate-post-kit'),
1565 'type' => Controls_Manager::CHOOSE,
1566 'options' => [
1567 'flex-start' => [
1568 'title' => __('Top', 'ultimate-post-kit'),
1569 'icon' => 'eicon-v-align-top',
1570 ],
1571 'center' => [
1572 'title' => __('Center', 'ultimate-post-kit'),
1573 'icon' => 'eicon-v-align-middle',
1574 ],
1575 'flex-end' => [
1576 'title' => __('Bottom', 'ultimate-post-kit'),
1577 'icon' => 'eicon-v-align-bottom',
1578 ],
1579 ],
1580 'selectors' => [
1581 '{{WRAPPER}}' => '--upk-swiper-dots-align: {{VALUE}};',
1582 ],
1583 'condition' => [
1584 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1585 ],
1586 ]
1587 );
1588
1589 $this->add_group_control(
1590 Group_Control_Box_Shadow::get_type(),
1591 [
1592 'name' => 'dots_active_box_shadow',
1593 'selector' => '{{WRAPPER}} .swiper-pagination-bullet-active',
1594 'condition' => [
1595 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1596 ],
1597 ]
1598 );
1599
1600 $this->end_controls_tab();
1601
1602 $this->end_controls_tabs();
1603
1604 $this->add_control(
1605 'hr_22',
1606 [
1607 'type' => Controls_Manager::DIVIDER,
1608 'condition' => [
1609 'navigation' => 'arrows-fraction',
1610 ],
1611 ]
1612 );
1613
1614 $this->add_control(
1615 'fraction_heading',
1616 [
1617 'label' => __('FRACTION', 'ultimate-post-kit'),
1618 'type' => Controls_Manager::HEADING,
1619 'condition' => [
1620 'navigation' => 'arrows-fraction',
1621 ],
1622 ]
1623 );
1624
1625 $this->add_control(
1626 'hr_12',
1627 [
1628 'type' => Controls_Manager::DIVIDER,
1629 'condition' => [
1630 'navigation' => 'arrows-fraction',
1631 ],
1632 ]
1633 );
1634
1635 $this->add_control(
1636 'fraction_color',
1637 [
1638 'label' => __('Color', 'ultimate-post-kit'),
1639 'type' => Controls_Manager::COLOR,
1640 'selectors' => [
1641 '{{WRAPPER}} .swiper-pagination-fraction' => 'color: {{VALUE}}',
1642 ],
1643 'condition' => [
1644 'navigation' => 'arrows-fraction',
1645 ],
1646 ]
1647 );
1648
1649 $this->add_control(
1650 'active_fraction_color',
1651 [
1652 'label' => __('Active Color', 'ultimate-post-kit'),
1653 'type' => Controls_Manager::COLOR,
1654 'selectors' => [
1655 '{{WRAPPER}} .swiper-pagination-current' => 'color: {{VALUE}}',
1656 ],
1657 'condition' => [
1658 'navigation' => 'arrows-fraction',
1659 ],
1660 ]
1661 );
1662
1663 $this->add_group_control(
1664 Group_Control_Typography::get_type(),
1665 [
1666 'name' => 'fraction_typography',
1667 'label' => esc_html__('Typography', 'ultimate-post-kit'),
1668 'selector' => '{{WRAPPER}} .swiper-pagination-fraction',
1669 'condition' => [
1670 'navigation' => 'arrows-fraction',
1671 ],
1672 ]
1673 );
1674
1675 $this->add_control(
1676 'hr_3',
1677 [
1678 'type' => Controls_Manager::DIVIDER,
1679 'condition' => [
1680 'navigation' => 'progressbar',
1681 ],
1682 ]
1683 );
1684
1685 $this->add_control(
1686 'progresbar_heading',
1687 [
1688 'label' => __('PROGRESSBAR', 'ultimate-post-kit'),
1689 'type' => Controls_Manager::HEADING,
1690 'condition' => [
1691 'navigation' => 'progressbar',
1692 ],
1693 ]
1694 );
1695
1696 $this->add_control(
1697 'hr_13',
1698 [
1699 'type' => Controls_Manager::DIVIDER,
1700 'condition' => [
1701 'navigation' => 'progressbar',
1702 ],
1703 ]
1704 );
1705
1706 $this->add_control(
1707 'progresbar_color',
1708 [
1709 'label' => __('Bar Color', 'ultimate-post-kit'),
1710 'type' => Controls_Manager::COLOR,
1711 'selectors' => [
1712 '{{WRAPPER}} .swiper-pagination-progressbar' => 'background-color: {{VALUE}}',
1713 ],
1714 'condition' => [
1715 'navigation' => 'progressbar',
1716 ],
1717 ]
1718 );
1719
1720 $this->add_control(
1721 'progres_color',
1722 [
1723 'label' => __('Progress Color', 'ultimate-post-kit'),
1724 'type' => Controls_Manager::COLOR,
1725 'separator' => 'after',
1726 'selectors' => [
1727 '{{WRAPPER}} .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}',
1728 ],
1729 'condition' => [
1730 'navigation' => 'progressbar',
1731 ],
1732 ]
1733 );
1734
1735 $this->add_control(
1736 'hr_4',
1737 [
1738 'type' => Controls_Manager::DIVIDER,
1739 'condition' => [
1740 'show_scrollbar' => 'yes'
1741 ],
1742 ]
1743 );
1744
1745 $this->add_control(
1746 'scrollbar_heading',
1747 [
1748 'label' => __('SCROLLBAR', 'ultimate-post-kit'),
1749 'type' => Controls_Manager::HEADING,
1750 'condition' => [
1751 'show_scrollbar' => 'yes'
1752 ],
1753 ]
1754 );
1755
1756 $this->add_control(
1757 'hr_14',
1758 [
1759 'type' => Controls_Manager::DIVIDER,
1760 'condition' => [
1761 'show_scrollbar' => 'yes'
1762 ],
1763 ]
1764 );
1765
1766 $this->add_control(
1767 'scrollbar_color',
1768 [
1769 'label' => __('Bar Color', 'ultimate-post-kit'),
1770 'type' => Controls_Manager::COLOR,
1771 'selectors' => [
1772 '{{WRAPPER}} .swiper-scrollbar' => 'background: {{VALUE}}',
1773 ],
1774 'condition' => [
1775 'show_scrollbar' => 'yes'
1776 ],
1777 ]
1778 );
1779
1780 $this->add_control(
1781 'scrollbar_drag_color',
1782 [
1783 'label' => __('Drag Color', 'ultimate-post-kit'),
1784 'type' => Controls_Manager::COLOR,
1785 'selectors' => [
1786 '{{WRAPPER}} .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}',
1787 ],
1788 'condition' => [
1789 'show_scrollbar' => 'yes'
1790 ],
1791 ]
1792 );
1793
1794 $this->add_responsive_control(
1795 'scrollbar_height',
1796 [
1797 'label' => __('Height', 'ultimate-post-kit'),
1798 'type' => Controls_Manager::SLIDER,
1799 'range' => [
1800 'px' => [
1801 'min' => 1,
1802 'max' => 10,
1803 ],
1804 ],
1805 'selectors' => [
1806 '{{WRAPPER}} .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;',
1807 ],
1808 'condition' => [
1809 'show_scrollbar' => 'yes'
1810 ],
1811 ]
1812 );
1813
1814 $this->add_control(
1815 'hr_05',
1816 [
1817 'type' => Controls_Manager::DIVIDER,
1818 ]
1819 );
1820
1821 $this->add_control(
1822 'navi_offset_heading',
1823 [
1824 'label' => __('OFFSET', 'ultimate-post-kit'),
1825 'type' => Controls_Manager::HEADING,
1826 ]
1827 );
1828
1829 $this->add_control(
1830 'hr_6',
1831 [
1832 'type' => Controls_Manager::DIVIDER,
1833 ]
1834 );
1835
1836 $this->add_responsive_control(
1837 'arrows_ncx_position',
1838 [
1839 'label' => __('Arrows Horizontal Offset', 'ultimate-post-kit'),
1840 'type' => Controls_Manager::SLIDER,
1841 'default' => [
1842 'size' => 0,
1843 ],
1844 'tablet_default' => [
1845 'size' => 0,
1846 ],
1847 'mobile_default' => [
1848 'size' => 0,
1849 ],
1850 'range' => [
1851 'px' => [
1852 'min' => -200,
1853 'max' => 200,
1854 ],
1855 ],
1856 'conditions' => [
1857 'terms' => [
1858 [
1859 'name' => 'navigation',
1860 'value' => 'arrows',
1861 ],
1862 [
1863 'name' => 'arrows_position',
1864 'operator' => '!=',
1865 'value' => 'center',
1866 ],
1867 ],
1868 ],
1869 'selectors' => [
1870 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-ncx: {{SIZE}}px;'
1871 ],
1872 ]
1873 );
1874
1875 $this->add_responsive_control(
1876 'arrows_ncy_position',
1877 [
1878 'label' => __('Arrows Vertical Offset', 'ultimate-post-kit'),
1879 'type' => Controls_Manager::SLIDER,
1880 'default' => [
1881 'size' => 40,
1882 ],
1883 'tablet_default' => [
1884 'size' => 40,
1885 ],
1886 'mobile_default' => [
1887 'size' => 40,
1888 ],
1889 'range' => [
1890 'px' => [
1891 'min' => -200,
1892 'max' => 200,
1893 ],
1894 ],
1895 'selectors' => [
1896 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-ncy: {{SIZE}}px;'
1897 ],
1898 'conditions' => [
1899 'terms' => [
1900 [
1901 'name' => 'navigation',
1902 'value' => 'arrows',
1903 ],
1904 [
1905 'name' => 'arrows_position',
1906 'operator' => '!=',
1907 'value' => 'center',
1908 ],
1909 ],
1910 ],
1911 ]
1912 );
1913
1914 $this->add_responsive_control(
1915 'arrows_acx_position',
1916 [
1917 'label' => __('Arrows Horizontal Offset', 'ultimate-post-kit'),
1918 'type' => Controls_Manager::SLIDER,
1919 'default' => [
1920 'size' => -60,
1921 ],
1922 'range' => [
1923 'px' => [
1924 'min' => -200,
1925 'max' => 200,
1926 ],
1927 ],
1928 'selectors' => [
1929 '{{WRAPPER}} .upk-navigation-prev' => 'left: {{SIZE}}px;',
1930 '{{WRAPPER}} .upk-navigation-next' => 'right: {{SIZE}}px;',
1931 ],
1932 'conditions' => [
1933 'terms' => [
1934 [
1935 'name' => 'navigation',
1936 'value' => 'arrows',
1937 ],
1938 [
1939 'name' => 'arrows_position',
1940 'value' => 'center',
1941 ],
1942 ],
1943 ],
1944 ]
1945 );
1946
1947 $this->add_responsive_control(
1948 'dots_nnx_position',
1949 [
1950 'label' => __('Dots Horizontal Offset', 'ultimate-post-kit'),
1951 'type' => Controls_Manager::SLIDER,
1952 'default' => [
1953 'size' => 0,
1954 ],
1955 'tablet_default' => [
1956 'size' => 0,
1957 ],
1958 'mobile_default' => [
1959 'size' => 0,
1960 ],
1961 'range' => [
1962 'px' => [
1963 'min' => -200,
1964 'max' => 200,
1965 ],
1966 ],
1967 'conditions' => [
1968 'terms' => [
1969 [
1970 'name' => 'navigation',
1971 'value' => 'dots',
1972 ],
1973 [
1974 'name' => 'dots_position',
1975 'operator' => '!=',
1976 'value' => '',
1977 ],
1978 ],
1979 ],
1980 'selectors' => [
1981 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-dots-nnx: {{SIZE}}px;'
1982 ],
1983 ]
1984 );
1985
1986 $this->add_responsive_control(
1987 'dots_nny_position',
1988 [
1989 'label' => __('Dots Vertical Offset', 'ultimate-post-kit'),
1990 'type' => Controls_Manager::SLIDER,
1991 'default' => [
1992 'size' => 30,
1993 ],
1994 'tablet_default' => [
1995 'size' => 30,
1996 ],
1997 'mobile_default' => [
1998 'size' => 30,
1999 ],
2000 'range' => [
2001 'px' => [
2002 'min' => -200,
2003 'max' => 200,
2004 ],
2005 ],
2006 'conditions' => [
2007 'terms' => [
2008 [
2009 'name' => 'navigation',
2010 'value' => 'dots',
2011 ],
2012 [
2013 'name' => 'dots_position',
2014 'operator' => '!=',
2015 'value' => '',
2016 ],
2017 ],
2018 ],
2019 'selectors' => [
2020 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-dots-nny: {{SIZE}}px;'
2021 ],
2022 ]
2023 );
2024
2025 $this->add_responsive_control(
2026 'both_ncx_position',
2027 [
2028 'label' => __('Arrows & Dots Horizontal Offset', 'ultimate-post-kit'),
2029 'type' => Controls_Manager::SLIDER,
2030 'default' => [
2031 'size' => 0,
2032 ],
2033 'tablet_default' => [
2034 'size' => 0,
2035 ],
2036 'mobile_default' => [
2037 'size' => 0,
2038 ],
2039 'range' => [
2040 'px' => [
2041 'min' => -200,
2042 'max' => 200,
2043 ],
2044 ],
2045 'conditions' => [
2046 'terms' => [
2047 [
2048 'name' => 'navigation',
2049 'value' => 'both',
2050 ],
2051 [
2052 'name' => 'both_position',
2053 'operator' => '!=',
2054 'value' => 'center',
2055 ],
2056 ],
2057 ],
2058 'selectors' => [
2059 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-both-ncx: {{SIZE}}px;'
2060 ],
2061 ]
2062 );
2063
2064 $this->add_responsive_control(
2065 'both_ncy_position',
2066 [
2067 'label' => __('Arrows & Dots Vertical Offset', 'ultimate-post-kit'),
2068 'type' => Controls_Manager::SLIDER,
2069 'default' => [
2070 'size' => 40,
2071 ],
2072 'tablet_default' => [
2073 'size' => 40,
2074 ],
2075 'mobile_default' => [
2076 'size' => 40,
2077 ],
2078 'range' => [
2079 'px' => [
2080 'min' => -200,
2081 'max' => 200,
2082 ],
2083 ],
2084 'conditions' => [
2085 'terms' => [
2086 [
2087 'name' => 'navigation',
2088 'value' => 'both',
2089 ],
2090 [
2091 'name' => 'both_position',
2092 'operator' => '!=',
2093 'value' => 'center',
2094 ],
2095 ],
2096 ],
2097 'selectors' => [
2098 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-both-ncy: {{SIZE}}px;'
2099 ],
2100 ]
2101 );
2102
2103 $this->add_responsive_control(
2104 'both_cx_position',
2105 [
2106 'label' => __('Arrows Offset', 'ultimate-post-kit'),
2107 'type' => Controls_Manager::SLIDER,
2108 'default' => [
2109 'size' => -60,
2110 ],
2111 'range' => [
2112 'px' => [
2113 'min' => -200,
2114 'max' => 200,
2115 ],
2116 ],
2117 'selectors' => [
2118 '{{WRAPPER}} .upk-navigation-prev' => 'left: {{SIZE}}px;',
2119 '{{WRAPPER}} .upk-navigation-next' => 'right: {{SIZE}}px;',
2120 ],
2121 'conditions' => [
2122 'terms' => [
2123 [
2124 'name' => 'navigation',
2125 'value' => 'both',
2126 ],
2127 [
2128 'name' => 'both_position',
2129 'value' => 'center',
2130 ],
2131 ],
2132 ],
2133 ]
2134 );
2135
2136 $this->add_responsive_control(
2137 'both_cy_position',
2138 [
2139 'label' => __('Dots Offset', 'ultimate-post-kit'),
2140 'type' => Controls_Manager::SLIDER,
2141 'default' => [
2142 'size' => 30,
2143 ],
2144 'range' => [
2145 'px' => [
2146 'min' => -200,
2147 'max' => 200,
2148 ],
2149 ],
2150 'selectors' => [
2151 '{{WRAPPER}} .upk-dots-container' => 'transform: translateY({{SIZE}}px);',
2152 ],
2153 'conditions' => [
2154 'terms' => [
2155 [
2156 'name' => 'navigation',
2157 'value' => 'both',
2158 ],
2159 [
2160 'name' => 'both_position',
2161 'value' => 'center',
2162 ],
2163 ],
2164 ],
2165 ]
2166 );
2167
2168 $this->add_responsive_control(
2169 'arrows_fraction_ncx_position',
2170 [
2171 'label' => __('Arrows & Fraction Horizontal Offset', 'ultimate-post-kit'),
2172 'type' => Controls_Manager::SLIDER,
2173 'default' => [
2174 'size' => 0,
2175 ],
2176 'tablet_default' => [
2177 'size' => 0,
2178 ],
2179 'mobile_default' => [
2180 'size' => 0,
2181 ],
2182 'range' => [
2183 'px' => [
2184 'min' => -200,
2185 'max' => 200,
2186 ],
2187 ],
2188 'conditions' => [
2189 'terms' => [
2190 [
2191 'name' => 'navigation',
2192 'value' => 'arrows-fraction',
2193 ],
2194 [
2195 'name' => 'arrows_fraction_position',
2196 'operator' => '!=',
2197 'value' => 'center',
2198 ],
2199 ],
2200 ],
2201 'selectors' => [
2202 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-fraction-ncx: {{SIZE}}px;'
2203 ],
2204 ]
2205 );
2206
2207 $this->add_responsive_control(
2208 'arrows_fraction_ncy_position',
2209 [
2210 'label' => __('Arrows & Fraction Vertical Offset', 'ultimate-post-kit'),
2211 'type' => Controls_Manager::SLIDER,
2212 'default' => [
2213 'size' => 40,
2214 ],
2215 'tablet_default' => [
2216 'size' => 40,
2217 ],
2218 'mobile_default' => [
2219 'size' => 40,
2220 ],
2221 'range' => [
2222 'px' => [
2223 'min' => -200,
2224 'max' => 200,
2225 ],
2226 ],
2227 'conditions' => [
2228 'terms' => [
2229 [
2230 'name' => 'navigation',
2231 'value' => 'arrows-fraction',
2232 ],
2233 [
2234 'name' => 'arrows_fraction_position',
2235 'operator' => '!=',
2236 'value' => 'center',
2237 ],
2238 ],
2239 ],
2240 'selectors' => [
2241 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-fraction-ncy: {{SIZE}}px;'
2242 ],
2243 ]
2244 );
2245
2246 $this->add_responsive_control(
2247 'arrows_fraction_cx_position',
2248 [
2249 'label' => __('Arrows Offset', 'ultimate-post-kit'),
2250 'type' => Controls_Manager::SLIDER,
2251 'default' => [
2252 'size' => -60,
2253 ],
2254 'range' => [
2255 'px' => [
2256 'min' => -200,
2257 'max' => 200,
2258 ],
2259 ],
2260 'selectors' => [
2261 '{{WRAPPER}} .upk-navigation-prev' => 'left: {{SIZE}}px;',
2262 '{{WRAPPER}} .upk-navigation-next' => 'right: {{SIZE}}px;',
2263 ],
2264 'conditions' => [
2265 'terms' => [
2266 [
2267 'name' => 'navigation',
2268 'value' => 'arrows-fraction',
2269 ],
2270 [
2271 'name' => 'arrows_fraction_position',
2272 'value' => 'center',
2273 ],
2274 ],
2275 ],
2276 ]
2277 );
2278
2279 $this->add_responsive_control(
2280 'arrows_fraction_cy_position',
2281 [
2282 'label' => __('Fraction Offset', 'ultimate-post-kit'),
2283 'type' => Controls_Manager::SLIDER,
2284 'default' => [
2285 'size' => 30,
2286 ],
2287 'range' => [
2288 'px' => [
2289 'min' => -200,
2290 'max' => 200,
2291 ],
2292 ],
2293 'selectors' => [
2294 '{{WRAPPER}} .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);',
2295 ],
2296 'conditions' => [
2297 'terms' => [
2298 [
2299 'name' => 'navigation',
2300 'value' => 'arrows-fraction',
2301 ],
2302 [
2303 'name' => 'arrows_fraction_position',
2304 'value' => 'center',
2305 ],
2306 ],
2307 ],
2308 ]
2309 );
2310
2311 $this->add_responsive_control(
2312 'progress_y_position',
2313 [
2314 'label' => __('Progress Offset', 'ultimate-post-kit'),
2315 'type' => Controls_Manager::SLIDER,
2316 'default' => [
2317 'size' => 15,
2318 ],
2319 'range' => [
2320 'px' => [
2321 'min' => -200,
2322 'max' => 200,
2323 ],
2324 ],
2325 'selectors' => [
2326 '{{WRAPPER}} .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);',
2327 ],
2328 'condition' => [
2329 'navigation' => 'progressbar',
2330 ],
2331 ]
2332 );
2333
2334 $this->add_responsive_control(
2335 'scrollbar_vertical_offset',
2336 [
2337 'label' => __('Scrollbar Offset', 'ultimate-post-kit'),
2338 'type' => Controls_Manager::SLIDER,
2339 'selectors' => [
2340 '{{WRAPPER}} .swiper-horizontal > .swiper-scrollbar' => 'bottom: {{SIZE}}px;',
2341 ],
2342 'condition' => [
2343 'show_scrollbar' => 'yes'
2344 ],
2345 ]
2346 );
2347
2348 $this->end_controls_section();
2349 }
2350 }
2351