PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / trunk
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets vtrunk
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 trunk, at traits/global-widget-controls.php

2,354 lines 55.0 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, {{WRAPPER}} ul.upk-pagination li a:hover span, {{WRAPPER}} ul.upk-pagination li a:hover i' => '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 'condition' => [
1050 'autoplay' => 'yes',
1051 ],
1052 ]
1053 );
1054
1055 $this->add_responsive_control(
1056 'slides_to_scroll',
1057 [
1058 'type' => Controls_Manager::SELECT,
1059 'label' => esc_html__('Slides to Scroll', 'ultimate-post-kit'),
1060 'default' => 1,
1061 'tablet_default' => 1,
1062 'mobile_default' => 1,
1063 'options' => [
1064 1 => '1',
1065 2 => '2',
1066 3 => '3',
1067 4 => '4',
1068 5 => '5',
1069 6 => '6',
1070 ],
1071 ]
1072 );
1073
1074 $this->add_control(
1075 'centered_slides',
1076 [
1077 'label' => __('Center Slide', 'ultimate-post-kit'),
1078 'description' => __('Use even items from Layout > Columns settings for better preview.', 'ultimate-post-kit'),
1079 'type' => Controls_Manager::SWITCHER,
1080 ]
1081 );
1082
1083 $this->add_control(
1084 'grab_cursor',
1085 [
1086 'label' => __('Grab Cursor', 'ultimate-post-kit'),
1087 'type' => Controls_Manager::SWITCHER,
1088 ]
1089 );
1090
1091 $this->add_control(
1092 'mousewheel',
1093 [
1094 'label' => __('Mousewheel', 'ultimate-post-kit'),
1095 'type' => Controls_Manager::SWITCHER,
1096 ]
1097 );
1098 $this->add_control(
1099 'loop',
1100 [
1101 'label' => __('Loop', 'ultimate-post-kit'),
1102 'type' => Controls_Manager::SWITCHER,
1103 'default' => 'yes',
1104
1105 ]
1106 );
1107
1108
1109 $this->add_control(
1110 'speed',
1111 [
1112 'label' => __('Animation Speed (ms)', 'ultimate-post-kit'),
1113 'type' => Controls_Manager::SLIDER,
1114 'default' => [
1115 'size' => 500,
1116 ],
1117 'range' => [
1118 'px' => [
1119 'min' => 100,
1120 'max' => 5000,
1121 'step' => 50,
1122 ],
1123 ],
1124 ]
1125 );
1126
1127 $this->add_control(
1128 'observer',
1129 [
1130 'label' => __('Observer', 'ultimate-post-kit'),
1131 'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-post-kit'),
1132 'type' => Controls_Manager::SWITCHER,
1133 ]
1134 );
1135
1136 $this->end_controls_section();
1137 }
1138
1139 function register_navigation_style($name) {
1140 $this->start_controls_section(
1141 'section_style_navigation',
1142 [
1143 'label' => __('Navigation', 'ultimate-post-kit'),
1144 'tab' => Controls_Manager::TAB_STYLE,
1145 'conditions' => [
1146 'relation' => 'or',
1147 'terms' => [
1148 [
1149 'name' => 'navigation',
1150 'operator' => '!=',
1151 'value' => 'none',
1152 ],
1153 [
1154 'name' => 'show_scrollbar',
1155 'value' => 'yes',
1156 ],
1157 ],
1158 ],
1159 ]
1160 );
1161
1162 $this->add_control(
1163 'arrows_heading',
1164 [
1165 'label' => __('ARROWS', 'ultimate-post-kit'),
1166 'type' => Controls_Manager::HEADING,
1167 'condition' => [
1168 'navigation!' => ['dots', 'progressbar', 'none'],
1169 ],
1170 ]
1171 );
1172
1173 $this->start_controls_tabs('tabs_navigation_arrows_style');
1174
1175 $this->start_controls_tab(
1176 'tabs_nav_arrows_normal',
1177 [
1178 'label' => __('Normal', 'ultimate-post-kit'),
1179 'condition' => [
1180 'navigation!' => ['dots', 'progressbar', 'none'],
1181 ],
1182 ]
1183 );
1184
1185 $this->add_control(
1186 'arrows_color',
1187 [
1188 'label' => __('Color', 'ultimate-post-kit'),
1189 'type' => Controls_Manager::COLOR,
1190 'selectors' => [
1191 '{{WRAPPER}} .upk-navigation-prev i, {{WRAPPER}} .upk-navigation-next i' => 'color: {{VALUE}}',
1192 ],
1193 'condition' => [
1194 'navigation!' => ['dots', 'progressbar', 'none'],
1195 ],
1196 ]
1197 );
1198
1199 $this->add_control(
1200 'arrows_background',
1201 [
1202 'label' => __('Background', 'ultimate-post-kit'),
1203 'type' => Controls_Manager::COLOR,
1204 'selectors' => [
1205 '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next' => 'background-color: {{VALUE}}',
1206 ],
1207 'condition' => [
1208 'navigation!' => ['dots', 'progressbar', 'none'],
1209 ],
1210 ]
1211 );
1212
1213 $this->add_group_control(
1214 Group_Control_Border::get_type(),
1215 [
1216 'name' => 'nav_arrows_border',
1217 'selector' => '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next',
1218 'condition' => [
1219 'navigation!' => ['dots', 'progressbar', 'none'],
1220 ],
1221 ]
1222 );
1223
1224 $this->add_responsive_control(
1225 'border_radius',
1226 [
1227 'label' => __('Border Radius', 'ultimate-post-kit'),
1228 'type' => Controls_Manager::DIMENSIONS,
1229 'size_units' => ['px', '%'],
1230 'selectors' => [
1231 '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1232 ],
1233 'condition' => [
1234 'navigation!' => ['dots', 'progressbar', 'none'],
1235 ],
1236 ]
1237 );
1238
1239 $this->add_responsive_control(
1240 'arrows_padding',
1241 [
1242 'label' => esc_html__('Padding', 'ultimate-post-kit'),
1243 'type' => Controls_Manager::DIMENSIONS,
1244 'size_units' => ['px', 'em', '%'],
1245 'selectors' => [
1246 '{{WRAPPER}} .upk-navigation-prev, {{WRAPPER}} .upk-navigation-next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1247 ],
1248 'condition' => [
1249 'navigation!' => ['dots', 'progressbar', 'none'],
1250 ],
1251 ]
1252 );
1253
1254 $this->add_responsive_control(
1255 'arrows_size',
1256 [
1257 'label' => __('Size', 'ultimate-post-kit'),
1258 'type' => Controls_Manager::SLIDER,
1259 'range' => [
1260 'px' => [
1261 'min' => 10,
1262 'max' => 100,
1263 ],
1264 ],
1265 'selectors' => [
1266 '{{WRAPPER}} .upk-navigation-prev i,
1267 {{WRAPPER}} .upk-navigation-next i' => 'font-size: {{SIZE || 24}}{{UNIT}};',
1268 ],
1269 'condition' => [
1270 'navigation!' => ['dots', 'progressbar', 'none'],
1271 ],
1272 ]
1273 );
1274
1275 $this->add_responsive_control(
1276 'arrows_space',
1277 [
1278 'label' => __('Space Between Arrows', 'ultimate-post-kit'),
1279 'type' => Controls_Manager::SLIDER,
1280 'range' => [
1281 'px' => [
1282 'min' => 0,
1283 'max' => 100,
1284 ],
1285 ],
1286 'selectors' => [
1287 '{{WRAPPER}} .upk-navigation-prev' => 'margin-right: {{SIZE}}px;',
1288 '{{WRAPPER}} .upk-navigation-next' => 'margin-left: {{SIZE}}px;',
1289 ],
1290 'condition' => [
1291 'navigation!' => ['dots', 'progressbar', 'none'],
1292 ],
1293 ]
1294 );
1295
1296 $this->end_controls_tab();
1297
1298 $this->start_controls_tab(
1299 'tabs_nav_arrows_hover',
1300 [
1301 'label' => __('Hover', 'ultimate-post-kit'),
1302 'condition' => [
1303 'navigation!' => ['dots', 'progressbar', 'none'],
1304 ],
1305 ]
1306 );
1307
1308 $this->add_control(
1309 'arrows_hover_color',
1310 [
1311 'label' => __('Color', 'ultimate-post-kit'),
1312 'type' => Controls_Manager::COLOR,
1313 'selectors' => [
1314 '{{WRAPPER}} .upk-navigation-prev:hover i, {{WRAPPER}} .upk-navigation-next:hover i' => 'color: {{VALUE}}',
1315 ],
1316 'condition' => [
1317 'navigation!' => ['dots', 'progressbar', 'none'],
1318 ],
1319 ]
1320 );
1321
1322 $this->add_control(
1323 'arrows_hover_background',
1324 [
1325 'label' => __('Background', 'ultimate-post-kit'),
1326 'type' => Controls_Manager::COLOR,
1327 'selectors' => [
1328 '{{WRAPPER}} .upk-navigation-prev:hover, {{WRAPPER}} .upk-navigation-next:hover' => 'background-color: {{VALUE}}',
1329 ],
1330 'condition' => [
1331 'navigation!' => ['dots', 'progressbar', 'none'],
1332 ],
1333 ]
1334 );
1335
1336 $this->add_control(
1337 'nav_arrows_hover_border_color',
1338 [
1339 'label' => __('Border Color', 'ultimate-post-kit'),
1340 'type' => Controls_Manager::COLOR,
1341 'selectors' => [
1342 '{{WRAPPER}} .upk-navigation-prev:hover, {{WRAPPER}} .upk-navigation-next:hover' => 'border-color: {{VALUE}};',
1343 ],
1344 'condition' => [
1345 'nav_arrows_border_border!' => '',
1346 'navigation!' => ['dots', 'progressbar', 'none'],
1347 ],
1348 ]
1349 );
1350
1351 $this->end_controls_tab();
1352
1353 $this->end_controls_tabs();
1354
1355 $this->add_control(
1356 'hr_1',
1357 [
1358 'type' => Controls_Manager::DIVIDER,
1359 'condition' => [
1360 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1361 ],
1362 ]
1363 );
1364
1365 $this->add_control(
1366 'dots_heading',
1367 [
1368 'label' => __('DOTS', 'ultimate-post-kit'),
1369 'type' => Controls_Manager::HEADING,
1370 'condition' => [
1371 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1372 ],
1373 ]
1374 );
1375
1376 $this->start_controls_tabs('tabs_navigation_dots_style');
1377
1378 $this->start_controls_tab(
1379 'tabs_nav_dots_normal',
1380 [
1381 'label' => __('Normal', 'ultimate-post-kit'),
1382 'condition' => [
1383 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1384 ],
1385 ]
1386 );
1387
1388 $this->add_control(
1389 'dots_color',
1390 [
1391 'label' => __('Color', 'ultimate-post-kit'),
1392 'type' => Controls_Manager::COLOR,
1393 'selectors' => [
1394 '{{WRAPPER}} .swiper-pagination-bullet' => 'background-color: {{VALUE}}',
1395 ],
1396 'condition' => [
1397 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1398 ],
1399 ]
1400 );
1401
1402 $this->add_responsive_control(
1403 'dots_space_between',
1404 [
1405 'label' => __('Space Between', 'ultimate-post-kit'),
1406 'type' => Controls_Manager::SLIDER,
1407 'selectors' => [
1408 '{{WRAPPER}}' => '--upk-swiper-dots-space-between: {{SIZE}}{{UNIT}};',
1409 ],
1410 'condition' => [
1411 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1412 ],
1413 ]
1414 );
1415
1416 $this->add_responsive_control(
1417 'dots_width_size',
1418 [
1419 'label' => __('Width(px)', 'ultimate-post-kit'),
1420 'type' => Controls_Manager::SLIDER,
1421 'range' => [
1422 'px' => [
1423 'min' => 1,
1424 'max' => 50,
1425 ],
1426 ],
1427 'selectors' => [
1428 '{{WRAPPER}} .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};',
1429 ],
1430 'condition' => [
1431 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1432 ],
1433 ]
1434 );
1435
1436 $this->add_responsive_control(
1437 'dots_height_size',
1438 [
1439 'label' => __('Height(px)', 'ultimate-post-kit'),
1440 'type' => Controls_Manager::SLIDER,
1441 'range' => [
1442 'px' => [
1443 'min' => 1,
1444 'max' => 50,
1445 ],
1446 ],
1447 'selectors' => [
1448 '{{WRAPPER}} .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};',
1449 ],
1450 'condition' => [
1451 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1452 ],
1453 ]
1454 );
1455
1456 $this->add_responsive_control(
1457 'dots_border_radius',
1458 [
1459 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
1460 'type' => Controls_Manager::DIMENSIONS,
1461 'size_units' => ['px', '%'],
1462 'selectors' => [
1463 '{{WRAPPER}} .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1464 ],
1465 'condition' => [
1466 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1467 ],
1468 ]
1469 );
1470
1471 $this->add_group_control(
1472 Group_Control_Box_Shadow::get_type(),
1473 [
1474 'name' => 'dots_box_shadow',
1475 'selector' => '{{WRAPPER}} .swiper-pagination-bullet',
1476 'condition' => [
1477 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1478 ],
1479 ]
1480 );
1481
1482 $this->end_controls_tab();
1483
1484 $this->start_controls_tab(
1485 'tabs_nav_dots_active',
1486 [
1487 'label' => __('Active', 'ultimate-post-kit'),
1488 'condition' => [
1489 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1490 ],
1491 ]
1492 );
1493
1494 $this->add_control(
1495 'active_dot_color',
1496 [
1497 'label' => __('Color', 'ultimate-post-kit'),
1498 'type' => Controls_Manager::COLOR,
1499 'selectors' => [
1500 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}',
1501 ],
1502 'condition' => [
1503 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1504 ],
1505 ]
1506 );
1507
1508 $this->add_responsive_control(
1509 'active_advanced_dots_width',
1510 [
1511 'label' => __('Width(px)', 'ultimate-post-kit'),
1512 'type' => Controls_Manager::SLIDER,
1513 'range' => [
1514 'px' => [
1515 'min' => 1,
1516 'max' => 50,
1517 ],
1518 ],
1519 'selectors' => [
1520 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'width: {{SIZE}}{{UNIT}};',
1521 ],
1522 'condition' => [
1523 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1524 ],
1525 ]
1526 );
1527
1528 $this->add_responsive_control(
1529 'active_dots_height',
1530 [
1531 'label' => __('Height(px)', 'ultimate-post-kit'),
1532 'type' => Controls_Manager::SLIDER,
1533 'range' => [
1534 'px' => [
1535 'min' => 1,
1536 'max' => 50,
1537 ],
1538 ],
1539 'selectors' => [
1540 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'height: {{SIZE}}{{UNIT}};',
1541 '{{WRAPPER}}' => '--upk-swiper-dots-active-height: {{SIZE}}{{UNIT}};',
1542 ],
1543 'condition' => [
1544 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1545 ],
1546 ]
1547 );
1548
1549 $this->add_responsive_control(
1550 'active_dots_radius',
1551 [
1552 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
1553 'type' => Controls_Manager::DIMENSIONS,
1554 'size_units' => ['px', '%'],
1555 'selectors' => [
1556 '{{WRAPPER}} .swiper-pagination-bullet-active' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1557 ],
1558 'condition' => [
1559 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1560 ],
1561 ]
1562 );
1563
1564 $this->add_responsive_control(
1565 'active_dots_align',
1566 [
1567 'label' => __('Alignment', 'ultimate-post-kit'),
1568 'type' => Controls_Manager::CHOOSE,
1569 'options' => [
1570 'flex-start' => [
1571 'title' => __('Top', 'ultimate-post-kit'),
1572 'icon' => 'eicon-v-align-top',
1573 ],
1574 'center' => [
1575 'title' => __('Center', 'ultimate-post-kit'),
1576 'icon' => 'eicon-v-align-middle',
1577 ],
1578 'flex-end' => [
1579 'title' => __('Bottom', 'ultimate-post-kit'),
1580 'icon' => 'eicon-v-align-bottom',
1581 ],
1582 ],
1583 'selectors' => [
1584 '{{WRAPPER}}' => '--upk-swiper-dots-align: {{VALUE}};',
1585 ],
1586 'condition' => [
1587 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1588 ],
1589 ]
1590 );
1591
1592 $this->add_group_control(
1593 Group_Control_Box_Shadow::get_type(),
1594 [
1595 'name' => 'dots_active_box_shadow',
1596 'selector' => '{{WRAPPER}} .swiper-pagination-bullet-active',
1597 'condition' => [
1598 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
1599 ],
1600 ]
1601 );
1602
1603 $this->end_controls_tab();
1604
1605 $this->end_controls_tabs();
1606
1607 $this->add_control(
1608 'hr_22',
1609 [
1610 'type' => Controls_Manager::DIVIDER,
1611 'condition' => [
1612 'navigation' => 'arrows-fraction',
1613 ],
1614 ]
1615 );
1616
1617 $this->add_control(
1618 'fraction_heading',
1619 [
1620 'label' => __('FRACTION', 'ultimate-post-kit'),
1621 'type' => Controls_Manager::HEADING,
1622 'condition' => [
1623 'navigation' => 'arrows-fraction',
1624 ],
1625 ]
1626 );
1627
1628 $this->add_control(
1629 'hr_12',
1630 [
1631 'type' => Controls_Manager::DIVIDER,
1632 'condition' => [
1633 'navigation' => 'arrows-fraction',
1634 ],
1635 ]
1636 );
1637
1638 $this->add_control(
1639 'fraction_color',
1640 [
1641 'label' => __('Color', 'ultimate-post-kit'),
1642 'type' => Controls_Manager::COLOR,
1643 'selectors' => [
1644 '{{WRAPPER}} .swiper-pagination-fraction' => 'color: {{VALUE}}',
1645 ],
1646 'condition' => [
1647 'navigation' => 'arrows-fraction',
1648 ],
1649 ]
1650 );
1651
1652 $this->add_control(
1653 'active_fraction_color',
1654 [
1655 'label' => __('Active Color', 'ultimate-post-kit'),
1656 'type' => Controls_Manager::COLOR,
1657 'selectors' => [
1658 '{{WRAPPER}} .swiper-pagination-current' => 'color: {{VALUE}}',
1659 ],
1660 'condition' => [
1661 'navigation' => 'arrows-fraction',
1662 ],
1663 ]
1664 );
1665
1666 $this->add_group_control(
1667 Group_Control_Typography::get_type(),
1668 [
1669 'name' => 'fraction_typography',
1670 'label' => esc_html__('Typography', 'ultimate-post-kit'),
1671 'selector' => '{{WRAPPER}} .swiper-pagination-fraction',
1672 'condition' => [
1673 'navigation' => 'arrows-fraction',
1674 ],
1675 ]
1676 );
1677
1678 $this->add_control(
1679 'hr_3',
1680 [
1681 'type' => Controls_Manager::DIVIDER,
1682 'condition' => [
1683 'navigation' => 'progressbar',
1684 ],
1685 ]
1686 );
1687
1688 $this->add_control(
1689 'progresbar_heading',
1690 [
1691 'label' => __('PROGRESSBAR', 'ultimate-post-kit'),
1692 'type' => Controls_Manager::HEADING,
1693 'condition' => [
1694 'navigation' => 'progressbar',
1695 ],
1696 ]
1697 );
1698
1699 $this->add_control(
1700 'hr_13',
1701 [
1702 'type' => Controls_Manager::DIVIDER,
1703 'condition' => [
1704 'navigation' => 'progressbar',
1705 ],
1706 ]
1707 );
1708
1709 $this->add_control(
1710 'progresbar_color',
1711 [
1712 'label' => __('Bar Color', 'ultimate-post-kit'),
1713 'type' => Controls_Manager::COLOR,
1714 'selectors' => [
1715 '{{WRAPPER}} .swiper-pagination-progressbar' => 'background-color: {{VALUE}}',
1716 ],
1717 'condition' => [
1718 'navigation' => 'progressbar',
1719 ],
1720 ]
1721 );
1722
1723 $this->add_control(
1724 'progres_color',
1725 [
1726 'label' => __('Progress Color', 'ultimate-post-kit'),
1727 'type' => Controls_Manager::COLOR,
1728 'separator' => 'after',
1729 'selectors' => [
1730 '{{WRAPPER}} .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}',
1731 ],
1732 'condition' => [
1733 'navigation' => 'progressbar',
1734 ],
1735 ]
1736 );
1737
1738 $this->add_control(
1739 'hr_4',
1740 [
1741 'type' => Controls_Manager::DIVIDER,
1742 'condition' => [
1743 'show_scrollbar' => 'yes'
1744 ],
1745 ]
1746 );
1747
1748 $this->add_control(
1749 'scrollbar_heading',
1750 [
1751 'label' => __('SCROLLBAR', 'ultimate-post-kit'),
1752 'type' => Controls_Manager::HEADING,
1753 'condition' => [
1754 'show_scrollbar' => 'yes'
1755 ],
1756 ]
1757 );
1758
1759 $this->add_control(
1760 'hr_14',
1761 [
1762 'type' => Controls_Manager::DIVIDER,
1763 'condition' => [
1764 'show_scrollbar' => 'yes'
1765 ],
1766 ]
1767 );
1768
1769 $this->add_control(
1770 'scrollbar_color',
1771 [
1772 'label' => __('Bar Color', 'ultimate-post-kit'),
1773 'type' => Controls_Manager::COLOR,
1774 'selectors' => [
1775 '{{WRAPPER}} .swiper-scrollbar' => 'background: {{VALUE}}',
1776 ],
1777 'condition' => [
1778 'show_scrollbar' => 'yes'
1779 ],
1780 ]
1781 );
1782
1783 $this->add_control(
1784 'scrollbar_drag_color',
1785 [
1786 'label' => __('Drag Color', 'ultimate-post-kit'),
1787 'type' => Controls_Manager::COLOR,
1788 'selectors' => [
1789 '{{WRAPPER}} .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}',
1790 ],
1791 'condition' => [
1792 'show_scrollbar' => 'yes'
1793 ],
1794 ]
1795 );
1796
1797 $this->add_responsive_control(
1798 'scrollbar_height',
1799 [
1800 'label' => __('Height', 'ultimate-post-kit'),
1801 'type' => Controls_Manager::SLIDER,
1802 'range' => [
1803 'px' => [
1804 'min' => 1,
1805 'max' => 10,
1806 ],
1807 ],
1808 'selectors' => [
1809 '{{WRAPPER}} .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;',
1810 ],
1811 'condition' => [
1812 'show_scrollbar' => 'yes'
1813 ],
1814 ]
1815 );
1816
1817 $this->add_control(
1818 'hr_05',
1819 [
1820 'type' => Controls_Manager::DIVIDER,
1821 ]
1822 );
1823
1824 $this->add_control(
1825 'navi_offset_heading',
1826 [
1827 'label' => __('OFFSET', 'ultimate-post-kit'),
1828 'type' => Controls_Manager::HEADING,
1829 ]
1830 );
1831
1832 $this->add_control(
1833 'hr_6',
1834 [
1835 'type' => Controls_Manager::DIVIDER,
1836 ]
1837 );
1838
1839 $this->add_responsive_control(
1840 'arrows_ncx_position',
1841 [
1842 'label' => __('Arrows Horizontal Offset', 'ultimate-post-kit'),
1843 'type' => Controls_Manager::SLIDER,
1844 'default' => [
1845 'size' => 0,
1846 ],
1847 'tablet_default' => [
1848 'size' => 0,
1849 ],
1850 'mobile_default' => [
1851 'size' => 0,
1852 ],
1853 'range' => [
1854 'px' => [
1855 'min' => -200,
1856 'max' => 200,
1857 ],
1858 ],
1859 'conditions' => [
1860 'terms' => [
1861 [
1862 'name' => 'navigation',
1863 'value' => 'arrows',
1864 ],
1865 [
1866 'name' => 'arrows_position',
1867 'operator' => '!=',
1868 'value' => 'center',
1869 ],
1870 ],
1871 ],
1872 'selectors' => [
1873 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-ncx: {{SIZE}}px;'
1874 ],
1875 ]
1876 );
1877
1878 $this->add_responsive_control(
1879 'arrows_ncy_position',
1880 [
1881 'label' => __('Arrows Vertical Offset', 'ultimate-post-kit'),
1882 'type' => Controls_Manager::SLIDER,
1883 'default' => [
1884 'size' => 40,
1885 ],
1886 'tablet_default' => [
1887 'size' => 40,
1888 ],
1889 'mobile_default' => [
1890 'size' => 40,
1891 ],
1892 'range' => [
1893 'px' => [
1894 'min' => -200,
1895 'max' => 200,
1896 ],
1897 ],
1898 'selectors' => [
1899 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-ncy: {{SIZE}}px;'
1900 ],
1901 'conditions' => [
1902 'terms' => [
1903 [
1904 'name' => 'navigation',
1905 'value' => 'arrows',
1906 ],
1907 [
1908 'name' => 'arrows_position',
1909 'operator' => '!=',
1910 'value' => 'center',
1911 ],
1912 ],
1913 ],
1914 ]
1915 );
1916
1917 $this->add_responsive_control(
1918 'arrows_acx_position',
1919 [
1920 'label' => __('Arrows Horizontal Offset', 'ultimate-post-kit'),
1921 'type' => Controls_Manager::SLIDER,
1922 'default' => [
1923 'size' => -60,
1924 ],
1925 'range' => [
1926 'px' => [
1927 'min' => -200,
1928 'max' => 200,
1929 ],
1930 ],
1931 'selectors' => [
1932 '{{WRAPPER}} .upk-navigation-prev' => 'left: {{SIZE}}px;',
1933 '{{WRAPPER}} .upk-navigation-next' => 'right: {{SIZE}}px;',
1934 ],
1935 'conditions' => [
1936 'terms' => [
1937 [
1938 'name' => 'navigation',
1939 'value' => 'arrows',
1940 ],
1941 [
1942 'name' => 'arrows_position',
1943 'value' => 'center',
1944 ],
1945 ],
1946 ],
1947 ]
1948 );
1949
1950 $this->add_responsive_control(
1951 'dots_nnx_position',
1952 [
1953 'label' => __('Dots Horizontal Offset', 'ultimate-post-kit'),
1954 'type' => Controls_Manager::SLIDER,
1955 'default' => [
1956 'size' => 0,
1957 ],
1958 'tablet_default' => [
1959 'size' => 0,
1960 ],
1961 'mobile_default' => [
1962 'size' => 0,
1963 ],
1964 'range' => [
1965 'px' => [
1966 'min' => -200,
1967 'max' => 200,
1968 ],
1969 ],
1970 'conditions' => [
1971 'terms' => [
1972 [
1973 'name' => 'navigation',
1974 'value' => 'dots',
1975 ],
1976 [
1977 'name' => 'dots_position',
1978 'operator' => '!=',
1979 'value' => '',
1980 ],
1981 ],
1982 ],
1983 'selectors' => [
1984 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-dots-nnx: {{SIZE}}px;'
1985 ],
1986 ]
1987 );
1988
1989 $this->add_responsive_control(
1990 'dots_nny_position',
1991 [
1992 'label' => __('Dots Vertical Offset', 'ultimate-post-kit'),
1993 'type' => Controls_Manager::SLIDER,
1994 'default' => [
1995 'size' => 30,
1996 ],
1997 'tablet_default' => [
1998 'size' => 30,
1999 ],
2000 'mobile_default' => [
2001 'size' => 30,
2002 ],
2003 'range' => [
2004 'px' => [
2005 'min' => -200,
2006 'max' => 200,
2007 ],
2008 ],
2009 'conditions' => [
2010 'terms' => [
2011 [
2012 'name' => 'navigation',
2013 'value' => 'dots',
2014 ],
2015 [
2016 'name' => 'dots_position',
2017 'operator' => '!=',
2018 'value' => '',
2019 ],
2020 ],
2021 ],
2022 'selectors' => [
2023 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-dots-nny: {{SIZE}}px;'
2024 ],
2025 ]
2026 );
2027
2028 $this->add_responsive_control(
2029 'both_ncx_position',
2030 [
2031 'label' => __('Arrows & Dots Horizontal Offset', 'ultimate-post-kit'),
2032 'type' => Controls_Manager::SLIDER,
2033 'default' => [
2034 'size' => 0,
2035 ],
2036 'tablet_default' => [
2037 'size' => 0,
2038 ],
2039 'mobile_default' => [
2040 'size' => 0,
2041 ],
2042 'range' => [
2043 'px' => [
2044 'min' => -200,
2045 'max' => 200,
2046 ],
2047 ],
2048 'conditions' => [
2049 'terms' => [
2050 [
2051 'name' => 'navigation',
2052 'value' => 'both',
2053 ],
2054 [
2055 'name' => 'both_position',
2056 'operator' => '!=',
2057 'value' => 'center',
2058 ],
2059 ],
2060 ],
2061 'selectors' => [
2062 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-both-ncx: {{SIZE}}px;'
2063 ],
2064 ]
2065 );
2066
2067 $this->add_responsive_control(
2068 'both_ncy_position',
2069 [
2070 'label' => __('Arrows & Dots Vertical Offset', 'ultimate-post-kit'),
2071 'type' => Controls_Manager::SLIDER,
2072 'default' => [
2073 'size' => 40,
2074 ],
2075 'tablet_default' => [
2076 'size' => 40,
2077 ],
2078 'mobile_default' => [
2079 'size' => 40,
2080 ],
2081 'range' => [
2082 'px' => [
2083 'min' => -200,
2084 'max' => 200,
2085 ],
2086 ],
2087 'conditions' => [
2088 'terms' => [
2089 [
2090 'name' => 'navigation',
2091 'value' => 'both',
2092 ],
2093 [
2094 'name' => 'both_position',
2095 'operator' => '!=',
2096 'value' => 'center',
2097 ],
2098 ],
2099 ],
2100 'selectors' => [
2101 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-both-ncy: {{SIZE}}px;'
2102 ],
2103 ]
2104 );
2105
2106 $this->add_responsive_control(
2107 'both_cx_position',
2108 [
2109 'label' => __('Arrows Offset', 'ultimate-post-kit'),
2110 'type' => Controls_Manager::SLIDER,
2111 'default' => [
2112 'size' => -60,
2113 ],
2114 'range' => [
2115 'px' => [
2116 'min' => -200,
2117 'max' => 200,
2118 ],
2119 ],
2120 'selectors' => [
2121 '{{WRAPPER}} .upk-navigation-prev' => 'left: {{SIZE}}px;',
2122 '{{WRAPPER}} .upk-navigation-next' => 'right: {{SIZE}}px;',
2123 ],
2124 'conditions' => [
2125 'terms' => [
2126 [
2127 'name' => 'navigation',
2128 'value' => 'both',
2129 ],
2130 [
2131 'name' => 'both_position',
2132 'value' => 'center',
2133 ],
2134 ],
2135 ],
2136 ]
2137 );
2138
2139 $this->add_responsive_control(
2140 'both_cy_position',
2141 [
2142 'label' => __('Dots Offset', 'ultimate-post-kit'),
2143 'type' => Controls_Manager::SLIDER,
2144 'default' => [
2145 'size' => 30,
2146 ],
2147 'range' => [
2148 'px' => [
2149 'min' => -200,
2150 'max' => 200,
2151 ],
2152 ],
2153 'selectors' => [
2154 '{{WRAPPER}} .upk-dots-container' => 'transform: translateY({{SIZE}}px);',
2155 ],
2156 'conditions' => [
2157 'terms' => [
2158 [
2159 'name' => 'navigation',
2160 'value' => 'both',
2161 ],
2162 [
2163 'name' => 'both_position',
2164 'value' => 'center',
2165 ],
2166 ],
2167 ],
2168 ]
2169 );
2170
2171 $this->add_responsive_control(
2172 'arrows_fraction_ncx_position',
2173 [
2174 'label' => __('Arrows & Fraction Horizontal Offset', 'ultimate-post-kit'),
2175 'type' => Controls_Manager::SLIDER,
2176 'default' => [
2177 'size' => 0,
2178 ],
2179 'tablet_default' => [
2180 'size' => 0,
2181 ],
2182 'mobile_default' => [
2183 'size' => 0,
2184 ],
2185 'range' => [
2186 'px' => [
2187 'min' => -200,
2188 'max' => 200,
2189 ],
2190 ],
2191 'conditions' => [
2192 'terms' => [
2193 [
2194 'name' => 'navigation',
2195 'value' => 'arrows-fraction',
2196 ],
2197 [
2198 'name' => 'arrows_fraction_position',
2199 'operator' => '!=',
2200 'value' => 'center',
2201 ],
2202 ],
2203 ],
2204 'selectors' => [
2205 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-fraction-ncx: {{SIZE}}px;'
2206 ],
2207 ]
2208 );
2209
2210 $this->add_responsive_control(
2211 'arrows_fraction_ncy_position',
2212 [
2213 'label' => __('Arrows & Fraction Vertical Offset', 'ultimate-post-kit'),
2214 'type' => Controls_Manager::SLIDER,
2215 'default' => [
2216 'size' => 40,
2217 ],
2218 'tablet_default' => [
2219 'size' => 40,
2220 ],
2221 'mobile_default' => [
2222 'size' => 40,
2223 ],
2224 'range' => [
2225 'px' => [
2226 'min' => -200,
2227 'max' => 200,
2228 ],
2229 ],
2230 'conditions' => [
2231 'terms' => [
2232 [
2233 'name' => 'navigation',
2234 'value' => 'arrows-fraction',
2235 ],
2236 [
2237 'name' => 'arrows_fraction_position',
2238 'operator' => '!=',
2239 'value' => 'center',
2240 ],
2241 ],
2242 ],
2243 'selectors' => [
2244 '{{WRAPPER}}' => '--upk-' . $name . '-carousel-arrows-fraction-ncy: {{SIZE}}px;'
2245 ],
2246 ]
2247 );
2248
2249 $this->add_responsive_control(
2250 'arrows_fraction_cx_position',
2251 [
2252 'label' => __('Arrows Offset', 'ultimate-post-kit'),
2253 'type' => Controls_Manager::SLIDER,
2254 'default' => [
2255 'size' => -60,
2256 ],
2257 'range' => [
2258 'px' => [
2259 'min' => -200,
2260 'max' => 200,
2261 ],
2262 ],
2263 'selectors' => [
2264 '{{WRAPPER}} .upk-navigation-prev' => 'left: {{SIZE}}px;',
2265 '{{WRAPPER}} .upk-navigation-next' => 'right: {{SIZE}}px;',
2266 ],
2267 'conditions' => [
2268 'terms' => [
2269 [
2270 'name' => 'navigation',
2271 'value' => 'arrows-fraction',
2272 ],
2273 [
2274 'name' => 'arrows_fraction_position',
2275 'value' => 'center',
2276 ],
2277 ],
2278 ],
2279 ]
2280 );
2281
2282 $this->add_responsive_control(
2283 'arrows_fraction_cy_position',
2284 [
2285 'label' => __('Fraction Offset', 'ultimate-post-kit'),
2286 'type' => Controls_Manager::SLIDER,
2287 'default' => [
2288 'size' => 30,
2289 ],
2290 'range' => [
2291 'px' => [
2292 'min' => -200,
2293 'max' => 200,
2294 ],
2295 ],
2296 'selectors' => [
2297 '{{WRAPPER}} .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);',
2298 ],
2299 'conditions' => [
2300 'terms' => [
2301 [
2302 'name' => 'navigation',
2303 'value' => 'arrows-fraction',
2304 ],
2305 [
2306 'name' => 'arrows_fraction_position',
2307 'value' => 'center',
2308 ],
2309 ],
2310 ],
2311 ]
2312 );
2313
2314 $this->add_responsive_control(
2315 'progress_y_position',
2316 [
2317 'label' => __('Progress Offset', 'ultimate-post-kit'),
2318 'type' => Controls_Manager::SLIDER,
2319 'default' => [
2320 'size' => 15,
2321 ],
2322 'range' => [
2323 'px' => [
2324 'min' => -200,
2325 'max' => 200,
2326 ],
2327 ],
2328 'selectors' => [
2329 '{{WRAPPER}} .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);',
2330 ],
2331 'condition' => [
2332 'navigation' => 'progressbar',
2333 ],
2334 ]
2335 );
2336
2337 $this->add_responsive_control(
2338 'scrollbar_vertical_offset',
2339 [
2340 'label' => __('Scrollbar Offset', 'ultimate-post-kit'),
2341 'type' => Controls_Manager::SLIDER,
2342 'selectors' => [
2343 '{{WRAPPER}} .swiper-horizontal > .swiper-scrollbar' => 'bottom: {{SIZE}}px;',
2344 ],
2345 'condition' => [
2346 'show_scrollbar' => 'yes'
2347 ],
2348 ]
2349 );
2350
2351 $this->end_controls_section();
2352 }
2353 }
2354