PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 2.0.0
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v2.0.0
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / traits / global-widget-controls.php

global-widget-controls.php in Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder 2.0.0, at traits/global-widget-controls.php

4,068 lines 147.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UltimateStoreKit\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_Image_Size;
10 use Elementor\Group_Control_Box_Shadow;
11
12
13 // use UltimateStoreKit\Modules\QueryControl\Controls\Group_Control_Posts;
14
15 defined('ABSPATH') || die();
16
17
18 trait Global_Widget_Controls {
19 protected function register_global_controls_grid_layout() {
20 $this->add_responsive_control(
21 'alignment',
22 [
23 'label' => esc_html__('Alignment', 'ultimate-store-kit'),
24 'type' => Controls_Manager::CHOOSE,
25 'options' => [
26 'left' => [
27 'title' => esc_html__('Left', 'ultimate-store-kit'),
28 'icon' => 'eicon-h-align-left',
29 ],
30 'center' => [
31 'title' => esc_html__('Center', 'ultimate-store-kit'),
32 'icon' => 'eicon-h-align-center',
33 ],
34 'right' => [
35 'title' => esc_html__('Right', 'ultimate-store-kit'),
36 'icon' => 'eicon-h-align-right',
37 ],
38 ],
39 'selectors' => [
40 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item .usk-item-box .usk-content' => 'text-align: {{VALUE}}',
41 '{{WRAPPER}} .' . $this->get_name() . ' .usk-rating' => 'justify-content: {{VALUE}}',
42 ],
43 'render_type' => 'template'
44 ]
45 );
46 $this->add_group_control(
47 Group_Control_Image_Size::get_type(),
48 [
49 'name' => 'image',
50 'label' => esc_html__('Image Size', 'ultimate-store-kit'),
51 'exclude' => ['custom'],
52 'default' => 'medium_large',
53 ]
54 );
55 }
56 protected function register_global_controls_query() {
57 $this->start_controls_section(
58 'section_content_query',
59 [
60 'label' => esc_html__('Query', 'ultimate-store-kit'),
61 ]
62 );
63
64 $this->add_control(
65 'source',
66 [
67 'label' => _x('Source', 'Posts Query Control', 'ultimate-store-kit'),
68 'type' => Controls_Manager::SELECT,
69 'options' => [
70 '' => esc_html__('Show All', 'ultimate-store-kit'),
71 'by_name' => esc_html__('Manual Selection', 'ultimate-store-kit'),
72 ],
73 'label_block' => true,
74 ]
75 );
76
77 $this->add_control(
78 'product_categories',
79 [
80 'label' => esc_html__('Categories', 'ultimate-store-kit'),
81 'type' => Controls_Manager::SELECT2,
82 'options' => ultimate_store_kit_get_category('product_cat'),
83 'default' => [],
84 'label_block' => true,
85 'multiple' => true,
86 'condition' => [
87 'source' => 'by_name',
88 ],
89 ]
90 );
91
92 $this->add_control(
93 'exclude_products',
94 [
95 'label' => esc_html__('Exclude Product(s)', 'ultimate-store-kit'),
96 'type' => Controls_Manager::TEXT,
97 'placeholder' => 'product_id',
98 'label_block' => true,
99 'description' => esc_html__('Write product id here, if you want to exclude multiple products so use comma as separator. Such as 1 , 2', ''),
100 ]
101 );
102
103 $this->add_control(
104 'posts_per_page',
105 [
106 'label' => esc_html__('Product Limit', 'ultimate-store-kit'),
107 'type' => Controls_Manager::NUMBER,
108 'default' => 9,
109 ]
110 );
111
112 $this->add_control(
113 'show_product_type',
114 [
115 'label' => esc_html__('Show Product', 'ultimate-store-kit'),
116 'type' => Controls_Manager::SELECT,
117 'default' => 'all',
118 'options' => [
119 'all' => esc_html__('All Products', 'ultimate-store-kit'),
120 'onsale' => esc_html__('On Sale', 'ultimate-store-kit'),
121 'featured' => esc_html__('Featured', 'ultimate-store-kit'),
122 ],
123 ]
124 );
125 $this->add_control(
126 'orderby',
127 [
128 'label' => esc_html__('Order by', 'ultimate-store-kit'),
129 'type' => Controls_Manager::SELECT,
130 'default' => 'date',
131 'options' => [
132 'date' => esc_html__('Date', 'ultimate-store-kit'),
133 'price' => esc_html__('Price', 'ultimate-store-kit'),
134 'sales' => esc_html__('Sales', 'ultimate-store-kit'),
135 'rand' => esc_html__('Random', 'ultimate-store-kit'),
136 ],
137 ]
138 );
139
140 $this->add_control(
141 'order',
142 [
143 'label' => esc_html__('Order', 'ultimate-store-kit'),
144 'type' => Controls_Manager::SELECT,
145 'default' => 'DESC',
146 'options' => [
147 'DESC' => esc_html__('Descending', 'ultimate-store-kit'),
148 'ASC' => esc_html__('Ascending', 'ultimate-store-kit'),
149 ],
150 ]
151 );
152
153 $this->add_control(
154 'show_pagination',
155 [
156 'label' => esc_html__('Pagination', 'ultimate-store-kit'),
157 'type' => Controls_Manager::SWITCHER,
158 // 'default' => 'yes'
159 ]
160 );
161
162 $this->add_control(
163 'show_per_page',
164 [
165 'label' => esc_html__('Show Per Page', 'ultimate-store-kit'),
166 'type' => Controls_Manager::SELECT,
167 'default' => '10',
168 'options' => [
169 '10' => '10',
170 '25' => '25',
171 '50' => '50',
172 '100' => '100',
173 ],
174 'condition' => [
175 'show_pagination' => 'yes',
176 ],
177 ]
178 );
179
180 $this->add_control(
181 'hide_free',
182 [
183 'label' => esc_html__('Hide Free', 'ultimate-store-kit'),
184 'type' => Controls_Manager::SWITCHER,
185 ]
186 );
187
188 $this->add_control(
189 'hide_out_stock',
190 [
191 'label' => esc_html__('Hide Out of Stock', 'ultimate-store-kit'),
192 'type' => Controls_Manager::SWITCHER,
193 ]
194 );
195
196 $this->end_controls_section();
197 }
198 protected function register_global_controls_additional() {
199 $this->start_controls_section(
200 'section_woocommerce_additional',
201 [
202 'label' => esc_html__('Additional', 'ultimate-store-kit'),
203 ]
204 );
205 $this->start_controls_tabs(
206 'tabs_show_hide_content'
207 );
208 $this->start_controls_tab(
209 'show_content_tab',
210 [
211 'label' => esc_html__('Content', 'ultimate-store-kit'),
212 ]
213 );
214 $this->add_control(
215 'show_title',
216 [
217 'label' => esc_html__('Title', 'ultimate-store-kit'),
218 'type' => Controls_Manager::SWITCHER,
219 'default' => 'yes'
220 ]
221 );
222 $this->add_control(
223 'title_tags',
224 [
225 'label' => esc_html__('Title HTML Tag', 'ultimate-store-kit'),
226 'type' => Controls_Manager::SELECT,
227 'default' => 'h3',
228 'options' => ultimate_store_kit_title_tags(),
229 'condition' => [
230 'show_title' => 'yes'
231 ]
232 ]
233 );
234 if ($this->get_name() !== 'usk-glossy-grid' && $this->get_name() !== 'usk-glossy-carousel') :
235 $this->add_control(
236 'show_category',
237 [
238 'label' => esc_html__('Category', 'ultimate-store-kit'),
239 'type' => Controls_Manager::SWITCHER,
240 'default' => 'yes',
241 'separator' => 'before'
242 ]
243 );
244 $this->add_control(
245 'category_tags',
246 [
247 'label' => esc_html__('Category HTML Tag', 'ultimate-store-kit'),
248 'type' => Controls_Manager::SELECT,
249 'default' => 'h5',
250 'options' => ultimate_store_kit_title_tags(),
251 'condition' => [
252 'show_category' => 'yes',
253 ],
254 ]
255 );
256 endif;
257 if ($this->get_name() !== 'usk-product-image-accordion' && $this->get_name() !== 'usk-heaven-slider') :
258 $this->add_control(
259 'show_excerpt',
260 [
261 'label' => esc_html__('Text', 'ultimate-store-kit'),
262 'type' => Controls_Manager::SWITCHER,
263 'default' => 'yes',
264 'separator' => 'before',
265 'condition' => [
266 'layout_style' => 'list'
267 ]
268 ]
269 );
270 $this->add_control(
271 'excerpt_limit',
272 [
273 'label' => esc_html__('Text Limit', 'ultimate-store-kit'),
274 'type' => Controls_Manager::NUMBER,
275 'default' => 15,
276 'condition' => [
277 'show_excerpt' => 'yes',
278 'layout_style' => 'list'
279 ],
280 ]
281 );
282 endif;
283 //enable this option for heaven slider
284 if ($this->get_name() === 'usk-heaven-slider') :
285 $this->add_control(
286 'show_excerpt',
287 [
288 'label' => esc_html__('Text', 'ultimate-store-kit'),
289 'type' => Controls_Manager::SWITCHER,
290 'default' => 'yes',
291 'separator' => 'before',
292 ]
293 );
294 $this->add_control(
295 'excerpt_limit',
296 [
297 'label' => esc_html__('Text Limit', 'ultimate-store-kit'),
298 'type' => Controls_Manager::NUMBER,
299 'default' => 25,
300 'condition' => [
301 'show_excerpt' => 'yes',
302 ],
303 ]
304 );
305 endif;
306 $this->add_control(
307 'show_rating',
308 [
309 'label' => esc_html__('Rating', 'ultimate-store-kit'),
310 'type' => Controls_Manager::SWITCHER,
311 'default' => 'yes',
312 'separator' => 'before'
313 ]
314 );
315
316 $this->add_control(
317 'show_price',
318 [
319 'label' => esc_html__('Price', 'ultimate-store-kit'),
320 'type' => Controls_Manager::SWITCHER,
321 'default' => 'yes',
322 ]
323 );
324
325 $this->end_controls_tab();
326 $this->start_controls_tab(
327 'show_sale_badge_tab',
328 [
329 'label' => esc_html__('Badge', 'ultimate-store-kit'),
330 ]
331 );
332 $this->add_control(
333 'show_sale_badge',
334 [
335 'label' => esc_html__('Sale', 'ultimate-store-kit'),
336 'type' => Controls_Manager::SWITCHER,
337 'default' => 'yes',
338 ]
339 );
340 $this->add_control(
341 'show_discount_badge',
342 [
343 'label' => esc_html__('Percentage', 'ultimate-store-kit'),
344 'type' => Controls_Manager::SWITCHER,
345 'default' => 'yes',
346 ]
347 );
348 $this->add_control(
349 'show_stock_status',
350 [
351 'label' => esc_html__('Stock Status', 'ultimate-store-kit'),
352 'type' => Controls_Manager::SWITCHER,
353 // 'default' => 'yes',
354 ]
355 );
356 $this->add_control(
357 'show_trending_badge',
358 [
359 'label' => esc_html__('Trending', 'ultimate-store-kit'),
360 'type' => Controls_Manager::SWITCHER,
361 'default' => 'yes',
362 ]
363 );
364 $this->add_control(
365 'show_new_badge',
366 [
367 'label' => esc_html__('New', 'ultimate-store-kit'),
368 'type' => Controls_Manager::SWITCHER,
369 'default' => 'yes',
370 ]
371 );
372 $this->add_control(
373 'newness_days',
374 [
375 'label' => esc_html__('Newness Days', 'ultimate-store-kit'),
376 'type' => Controls_Manager::NUMBER,
377 'default' => 30,
378 'condition' => [
379 'show_new_badge' => 'yes',
380 ],
381 ]
382 );
383 $this->end_controls_tab();
384 $this->start_controls_tab(
385 'show_action_btn_tab',
386 [
387 'label' => esc_html__('Action btn', 'ultimate-store-kit'),
388 ]
389 );
390 $this->add_control(
391 'show_wishlist',
392 [
393 'label' => esc_html__('Wishlist', 'ultimate-store-kit'),
394 'type' => Controls_Manager::SWITCHER,
395 'default' => 'yes',
396 ]
397 );
398 $this->add_control(
399 'show_compare',
400 [
401 'label' => esc_html__('Compare', 'ultimate-store-kit'),
402 'type' => Controls_Manager::SWITCHER,
403 ]
404 );
405 $this->add_control(
406 'show_quick_view',
407 [
408 'label' => esc_html__('Quick View', 'ultimate-store-kit'),
409 'type' => Controls_Manager::SWITCHER,
410 'default' => 'yes',
411 ]
412 );
413 $this->add_control(
414 'show_cart',
415 [
416 'label' => esc_html__('Add to Cart', 'ultimate-store-kit'),
417 'type' => Controls_Manager::SWITCHER,
418 'default' => 'yes',
419 ]
420 );
421 $this->end_controls_tab();
422 $this->end_controls_tabs();
423 $this->end_controls_section();
424 }
425
426 protected function register_global_controls_grid_columns() {
427 $this->start_controls_section(
428 'section_style_columns_filter',
429 [
430 'label' => esc_html__('Columns Filter', 'ultimate-store-kit'),
431 'tab' => Controls_Manager::TAB_STYLE,
432 'condition' => ['show_tab' => 'yes']
433 ]
434 );
435
436 $this->start_controls_tabs('style_columns_filter_tabs');
437
438 $this->start_controls_tab(
439 'tab_columns_filter_normal',
440 [
441 'label' => esc_html__('Normal', 'ultimate-store-kit'),
442 ]
443 );
444
445 $this->add_control(
446 'columns_filter_color',
447 [
448 'label' => esc_html__('Color', 'ultimate-store-kit'),
449 'type' => Controls_Manager::COLOR,
450 'selectors' => [
451 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list a' => 'color: {{VALUE}}',
452 ],
453 ]
454 );
455
456 $this->add_group_control(
457 Group_Control_Background::get_type(),
458 [
459 'name' => 'columns_filter_background',
460 'exclude' => ['image'],
461 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list a',
462 ]
463 );
464
465 $this->add_responsive_control(
466 'columns_filter_border_width',
467 [
468 'label' => esc_html__('Border Width', 'ultimate-store-kit'),
469 'type' => Controls_Manager::SLIDER,
470 'default' => [
471 'size' => 1,
472 ],
473 'range' => [
474 'px' => [
475 'min' => 0,
476 'max' => 10,
477 ],
478 ],
479 'selectors' => [
480 '{{WRAPPER}}' => '--usk-filter-border-width: {{SIZE}}{{UNIT}};',
481 ],
482 'separator' => 'before',
483 ]
484 );
485
486 $this->add_control(
487 'columns_filter_border_color',
488 [
489 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
490 'type' => Controls_Manager::COLOR,
491 'selectors' => [
492 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list a' => 'border-color: {{VALUE}}',
493 ],
494 ]
495 );
496
497 $this->add_responsive_control(
498 'columns_filter_padding',
499 [
500 'label' => esc_html__('Padding', 'ultimate-store-kit'),
501 'type' => Controls_Manager::DIMENSIONS,
502 'size_units' => ['px', '%', 'em'],
503 'selectors' => [
504 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
505 ],
506 ]
507 );
508
509 $this->add_responsive_control(
510 'columns_filter_margin',
511 [
512 'label' => esc_html__('Margin', 'ultimate-store-kit'),
513 'type' => Controls_Manager::DIMENSIONS,
514 'size_units' => ['px', '%', 'em'],
515 'selectors' => [
516 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
517 ],
518 ]
519 );
520
521 $this->end_controls_tab();
522
523 $this->start_controls_tab(
524 'tab_columns_filter_hover',
525 [
526 'label' => esc_html__('Hover', 'ultimate-store-kit'),
527 ]
528 );
529
530 $this->add_control(
531 'columns_filter_hover_color',
532 [
533 'label' => esc_html__('Color', 'ultimate-store-kit'),
534 'type' => Controls_Manager::COLOR,
535 'selectors' => [
536 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list a:hover' => 'color: {{VALUE}}',
537 ],
538 ]
539 );
540
541 $this->add_group_control(
542 Group_Control_Background::get_type(),
543 [
544 'name' => 'columns_filter_hover_background',
545 'exclude' => ['image'],
546 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list a:hover',
547 ]
548 );
549
550 $this->end_controls_tab();
551
552 $this->start_controls_tab(
553 'tab_columns_filter_active',
554 [
555 'label' => esc_html__('Active', 'ultimate-store-kit'),
556 ]
557 );
558
559 $this->add_control(
560 'columns_filter_active_color',
561 [
562 'label' => esc_html__('Color', 'ultimate-store-kit'),
563 'type' => Controls_Manager::COLOR,
564 'selectors' => [
565 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list.usk-tabs-active a' => 'color: {{VALUE}}',
566 ],
567 ]
568 );
569
570 $this->add_group_control(
571 Group_Control_Background::get_type(),
572 [
573 'name' => 'columns_filter_active_background',
574 'exclude' => ['image'],
575 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-tabs-list.usk-tabs-active a',
576 ]
577 );
578
579 $this->end_controls_tab();
580 $this->end_controls_tabs();
581 $this->end_controls_section();
582 }
583 protected function register_global_controls_result_count() {
584 $this->start_controls_section(
585 'section_style_result_count',
586 [
587 'label' => esc_html__('Count Result', 'ultimate-store-kit'),
588 'tab' => Controls_Manager::TAB_STYLE,
589 'condition' => [
590 'show_tab' => 'yes',
591 'show_result_count' => 'yes',
592 ]
593 ]
594 );
595 $this->add_control(
596 'result_count_color',
597 [
598 'label' => esc_html__('Color', 'ultimate-store-kit'),
599 'type' => Controls_Manager::COLOR,
600 'selectors' => [
601 '{{WRAPPER}} .woocommerce-result-count' => 'color: {{VALUE}}',
602 ],
603 ]
604 );
605
606 $this->add_responsive_control(
607 'result_count_margin',
608 [
609 'label' => esc_html__('Margin', 'ultimate-store-kit'),
610 'type' => Controls_Manager::DIMENSIONS,
611 'size_units' => ['px', '%', 'em'],
612 'selectors' => [
613 '{{WRAPPER}} .woocommerce-result-count' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
614 ],
615 ]
616 );
617
618 $this->add_group_control(
619 Group_Control_Typography::get_type(),
620 [
621 'name' => 'result_count_typography',
622 'label' => esc_html__('Typography', 'ultimate-store-kit'),
623 'selector' => '{{WRAPPER}} .woocommerce-result-count',
624 ]
625 );
626
627 $this->end_controls_section();
628 }
629
630 protected function register_global_controls_grid_items() {
631 $this->start_controls_section(
632 'section_style_item',
633 [
634 'label' => esc_html__('Items', 'ultimate-store-kit'),
635 'tab' => Controls_Manager::TAB_STYLE,
636 ]
637 );
638
639 $this->start_controls_tabs('item_tabs');
640
641 $this->start_controls_tab(
642 'item_tab_normal',
643 [
644 'label' => esc_html__('Normal', 'ultimate-store-kit'),
645 ]
646 );
647
648 $this->add_group_control(
649 Group_Control_Border::get_type(),
650 [
651 'name' => 'item_border',
652 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item',
653 ]
654 );
655
656 $this->add_responsive_control(
657 'item_border_radius',
658 [
659 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
660 'type' => Controls_Manager::DIMENSIONS,
661 'size_units' => ['px', '%', 'em'],
662 'selectors' => [
663 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
664 ],
665 ]
666 );
667
668 $this->add_responsive_control(
669 'item_padding',
670 [
671 'label' => esc_html__('Padding', 'ultimate-store-kit'),
672 'type' => Controls_Manager::DIMENSIONS,
673 'size_units' => ['px', '%', 'em'],
674 'selectors' => [
675 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
676 ],
677 ]
678 );
679
680 if ($this->get_name() !== 'usk-glossy-grid') {
681 $this->add_group_control(
682 Group_Control_Box_Shadow::get_type(),
683 [
684 'name' => 'item_shadow',
685 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item',
686 ]
687 );
688 }
689
690 $this->end_controls_tab();
691
692 $this->start_controls_tab(
693 'item_tab_hover',
694 [
695 'label' => esc_html__('Hover', 'ultimate-store-kit'),
696 ]
697 );
698
699 $this->add_control(
700 'item_hover_border_color',
701 [
702 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
703 'type' => Controls_Manager::COLOR,
704 'selectors' => [
705 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover' => 'border-color: {{VALUE}}',
706 ],
707 'condition' => [
708 'item_border_border!' => '',
709 ],
710 ]
711 );
712
713 if ($this->get_name() !== 'usk-glossy-grid') {
714 $this->add_group_control(
715 Group_Control_Box_Shadow::get_type(),
716 [
717 'name' => 'item_hover_shadow',
718 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover',
719 ]
720 );
721 }
722 if ($this->get_name() === 'usk-glossy-grid') {
723 $this->add_control(
724 'item_box_shadow_color',
725 [
726 'label' => esc_html__('Shadow Color', 'ultimate-store-kit'),
727 'type' => Controls_Manager::COLOR,
728 'selectors' => [
729 '{{WRAPPER}} .usk-glossy-grid .usk-product-hover:before' => 'box-shadow: 0 8px 55px {{VALUE}}',
730 ],
731 ]
732 );
733 $this->add_control(
734 'item_shape_color',
735 [
736 'label' => esc_html__('Shape Color', 'ultimate-store-kit'),
737 'type' => Controls_Manager::COLOR,
738 'selectors' => [
739 '{{WRAPPER}} .usk-glossy-grid .usk-product-hover:before' => 'background-color: {{VALUE}}',
740 ],
741 ]
742 );
743 }
744
745 $this->end_controls_tab();
746 $this->end_controls_tabs();
747 $this->end_controls_section();
748 }
749
750 protected function register_global_controls_grid_image() {
751 $this->start_controls_section(
752 'section_style_image',
753 [
754 'label' => esc_html__('Image', 'ultimate-store-kit'),
755 'tab' => Controls_Manager::TAB_STYLE,
756 ]
757 );
758 $this->start_controls_tabs(
759 'style_tabs_image'
760 );
761 $this->start_controls_tab(
762 'image_normal',
763 [
764 'label' => esc_html__('Normal', 'ultimate-store-kit'),
765 ]
766 );
767 $this->add_group_control(
768 Group_Control_Background::get_type(),
769 [
770 'name' => 'image_background',
771 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-image',
772 ]
773 );
774 $this->add_group_control(
775 Group_Control_Border::get_type(),
776 [
777 'name' => 'image_border',
778 'label' => esc_html__('Image Border', 'ultimate-store-kit'),
779 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-image',
780 'separator' => 'before',
781 ]
782 );
783
784 $this->add_responsive_control(
785 'image_border_radius',
786 [
787 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
788 'type' => Controls_Manager::DIMENSIONS,
789 'size_units' => ['px', '%'],
790 'selectors' => [
791 '{{WRAPPER}} .' . $this->get_name() . ' .usk-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
792 ],
793 ]
794 );
795
796 $this->add_responsive_control(
797 'image_padding',
798 [
799 'label' => esc_html__('Padding', 'ultimate-store-kit'),
800 'type' => Controls_Manager::DIMENSIONS,
801 'size_units' => ['px', '%'],
802 'selectors' => [
803 '{{WRAPPER}} .' . $this->get_name() . ' .usk-image' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
804 ],
805 ]
806 );
807
808 $this->add_group_control(
809 Group_Control_Box_Shadow::get_type(),
810 [
811 'name' => 'image_shadow',
812 'exclude' => [
813 'shadow_position',
814 ],
815 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-image',
816 ]
817 );
818 $this->end_controls_tab();
819 $this->start_controls_tab(
820 'image_hover',
821 [
822 'label' => esc_html__('Hover', 'ultimate-store-kit'),
823 ]
824 );
825 $this->add_group_control(
826 Group_Control_Background::get_type(),
827 [
828 'name' => 'image_hover_background',
829 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-image',
830 ]
831 );
832 $this->add_group_control(
833 Group_Control_Border::get_type(),
834 [
835 'name' => 'image_hover_border',
836 'label' => esc_html__('Image Border', 'ultimate-store-kit'),
837 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-image',
838 'separator' => 'before',
839 ]
840 );
841
842 $this->add_responsive_control(
843 'image_hover_border_radius',
844 [
845 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
846 'type' => Controls_Manager::DIMENSIONS,
847 'size_units' => ['px', '%'],
848 'selectors' => [
849 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
850 ],
851 ]
852 );
853
854 $this->add_group_control(
855 Group_Control_Box_Shadow::get_type(),
856 [
857 'name' => 'image_hover_shadow',
858 'exclude' => [
859 'shadow_position',
860 ],
861 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-image',
862 ]
863 );
864 $this->end_controls_tab();
865 $this->end_controls_tabs();
866
867 $this->end_controls_section();
868 }
869
870 protected function register_global_controls_content() {
871 $this->start_controls_section(
872 'section_style_content',
873 [
874 'label' => esc_html__('Content', 'ultimate-store-kit'),
875 'tab' => Controls_Manager::TAB_STYLE,
876 ]
877 );
878
879 $this->start_controls_tabs('tabs_content_style');
880
881 $this->start_controls_tab(
882 'tab_content_normal',
883 [
884 'label' => esc_html__('Normal', 'ultimate-store-kit'),
885 ]
886 );
887 $this->add_group_control(
888 Group_Control_Background::get_type(),
889 [
890 'name' => 'content_background',
891 'label' => esc_html__('Background', 'ultimate-store-kit'),
892 'types' => ['classic', 'gradient'],
893 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-content',
894 ]
895 );
896
897 $this->add_group_control(
898 Group_Control_Border::get_type(),
899 [
900 'name' => 'content_border',
901 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
902 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-content',
903 'separator' => 'before',
904 ]
905 );
906
907 $this->add_responsive_control(
908 'content_radius',
909 [
910 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
911 'type' => Controls_Manager::DIMENSIONS,
912 'size_units' => ['px', '%'],
913 'selectors' => [
914 '{{WRAPPER}} .' . $this->get_name() . ' .usk-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
915 ],
916 ]
917 );
918
919 $this->add_responsive_control(
920 'content_padding',
921 [
922 'label' => esc_html__('Padding', 'ultimate-store-kit'),
923 'type' => Controls_Manager::DIMENSIONS,
924 'size_units' => ['px', 'em', '%'],
925 'selectors' => [
926 '{{WRAPPER}} .' . $this->get_name() . ' .usk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
927 ],
928 ]
929 );
930 $this->end_controls_tab();
931
932 $this->start_controls_tab(
933 'tab_content_hover',
934 [
935 'label' => esc_html__('Hover', 'ultimate-store-kit'),
936 ]
937 );
938 $this->add_group_control(
939 Group_Control_Background::get_type(),
940 [
941 'name' => 'content_hover_background',
942 'label' => esc_html__('Background', 'ultimate-store-kit'),
943 'types' => ['classic', 'gradient'],
944 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-content:hover',
945 ]
946 );
947 $this->add_control(
948 'content_hover_border_color',
949 [
950 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
951 'type' => Controls_Manager::COLOR,
952 'condition' => [
953 'content_border_border!' => '',
954 ],
955 'selectors' => [
956 '{{WRAPPER}} .' . $this->get_name() . ' .usk-content:hover' => 'border-color: {{VALUE}};',
957 ],
958 ]
959 );
960 $this->end_controls_tab();
961
962 $this->end_controls_tabs();
963
964 $this->end_controls_section();
965 }
966
967 protected function register_global_controls_title() {
968 $this->start_controls_section(
969 'section_style_title',
970 [
971 'label' => esc_html__('Title', 'ultimate-store-kit'),
972 'tab' => Controls_Manager::TAB_STYLE,
973 ]
974 );
975
976 $this->add_control(
977 'title_color',
978 [
979 'label' => esc_html__('Color', 'ultimate-store-kit'),
980 'type' => Controls_Manager::COLOR,
981 'selectors' => [
982 '{{WRAPPER}} .' . $this->get_name() . ' .usk-title' => 'color: {{VALUE}}',
983 ],
984 ]
985 );
986
987 $this->add_control(
988 'hover_title_color',
989 [
990 'label' => esc_html__('Hover Color', 'ultimate-store-kit'),
991 'type' => Controls_Manager::COLOR,
992 'selectors' => [
993 '{{WRAPPER}} .' . $this->get_name() . ' .usk-title:hover' => 'color: {{VALUE}};',
994 ],
995 ]
996 );
997
998 $this->add_responsive_control(
999 'title_margin',
1000 [
1001 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1002 'type' => Controls_Manager::DIMENSIONS,
1003 'size_units' => ['px', '%'],
1004 'selectors' => [
1005 '{{WRAPPER}} .' . $this->get_name() . ' .usk-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1006 ],
1007 ]
1008 );
1009
1010 $this->add_group_control(
1011 Group_Control_Typography::get_type(),
1012 [
1013 'name' => 'title_typography',
1014 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1015 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-title .title',
1016 ]
1017 );
1018
1019 $this->end_controls_section();
1020 }
1021
1022 public function register_global_controls_add_to_cart() {
1023 $this->start_controls_section(
1024 'section_style_button',
1025 [
1026 'label' => esc_html__('Add to Cart', 'ultimate-store-kit'),
1027 'tab' => Controls_Manager::TAB_STYLE,
1028 'condition' => [
1029 'show_cart' => 'yes',
1030 ],
1031 ]
1032 );
1033
1034 $this->start_controls_tabs('tabs_button_style');
1035
1036 $this->start_controls_tab(
1037 'tab_button_normal',
1038 [
1039 'label' => esc_html__('Normal', 'ultimate-store-kit'),
1040 ]
1041 );
1042
1043 $this->add_control(
1044 'button_text_color',
1045 [
1046 'label' => esc_html__('Color', 'ultimate-store-kit'),
1047 'type' => Controls_Manager::COLOR,
1048 'default' => '',
1049 'selectors' => [
1050 '{{WRAPPER}} .' . $this->get_name() . ' .usk-button' => 'color: {{VALUE}};',
1051 '{{WRAPPER}} .' . $this->get_name() . ' .added_to_cart' => 'color: {{VALUE}};',
1052 '{{WRAPPER}} .' . $this->get_name() . ' .usk-button.loading::after' => 'border-color: {{VALUE}}'
1053 ],
1054 ]
1055 );
1056
1057 $this->add_group_control(
1058 Group_Control_Background::get_type(),
1059 [
1060 'name' => 'btn_background_color',
1061 'label' => esc_html__('Background', 'ultimate-store-kit'),
1062 'types' => ['classic', 'gradient'],
1063 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-button, {{WRAPPER}} .' . $this->get_name() . ' .added_to_cart',
1064 ]
1065 );
1066
1067 $this->add_group_control(
1068 Group_Control_Border::get_type(),
1069 [
1070 'name' => 'btn_border',
1071 'label' => esc_html__('Border', 'ultimate-store-kit'),
1072 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-button, {{WRAPPER}} .' . $this->get_name() . ' .added_to_cart',
1073 'separator' => 'before',
1074 ]
1075 );
1076
1077 $this->add_responsive_control(
1078 'btn_border_radius',
1079 [
1080 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1081 'type' => Controls_Manager::DIMENSIONS,
1082 'size_units' => ['px', '%'],
1083 'selectors' => [
1084 '{{WRAPPER}} .' . $this->get_name() . ' .usk-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1085 '{{WRAPPER}} .' . $this->get_name() . ' .added_to_cart' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1086 ],
1087 ]
1088 );
1089
1090 $this->add_responsive_control(
1091 'button_width',
1092 [
1093 'label' => esc_html__('Width(%)', 'ultimate-store-kit'),
1094 'type' => Controls_Manager::SLIDER,
1095 'range' => [
1096 'px' => [
1097 'min' => 10,
1098 'max' => 100,
1099 ]
1100 ],
1101 'selectors' => [
1102 '{{WRAPPER}} .' . $this->get_name() . '' => '--btn-width: {{SIZE}}%;',
1103 ],
1104 ]
1105 );
1106
1107 $this->add_responsive_control(
1108 'button_height',
1109 [
1110 'label' => esc_html__('Height(px)', 'ultimate-store-kit'),
1111 'type' => Controls_Manager::SLIDER,
1112 'range' => [
1113 'px' => [
1114 'min' => 10,
1115 'max' => 100,
1116 ]
1117 ],
1118 'selectors' => [
1119 '{{WRAPPER}} .' . $this->get_name() . ' .usk-button, {{WRAPPER}} .' . $this->get_name() . ' .added_to_cart' => 'height: {{SIZE}}px; line-height: {{SIZE}}px;',
1120 ],
1121 ]
1122 );
1123
1124 $this->add_group_control(
1125 Group_Control_Typography::get_type(),
1126 [
1127 'name' => 'button_typography',
1128 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-button, {{WRAPPER}} .' . $this->get_name() . ' .added_to_cart',
1129 ]
1130 );
1131 $this->end_controls_tab();
1132
1133 $this->start_controls_tab(
1134 'tab_button_hover',
1135 [
1136 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1137 ]
1138 );
1139
1140 $this->add_control(
1141 'hover_color',
1142 [
1143 'label' => esc_html__('Color', 'ultimate-store-kit'),
1144 'type' => Controls_Manager::COLOR,
1145 'selectors' => [
1146 '{{WRAPPER}} .' . $this->get_name() . ' .usk-button:hover' => 'color: {{VALUE}};',
1147 '{{WRAPPER}} .' . $this->get_name() . ' .added_to_cart:hover' => 'color: {{VALUE}};',
1148 ],
1149 ]
1150 );
1151
1152 $this->add_group_control(
1153 Group_Control_Background::get_type(),
1154 [
1155 'name' => 'btn_hover_bg',
1156 'label' => esc_html__('Background', 'ultimate-store-kit'),
1157 'types' => ['classic', 'gradient'],
1158 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-button:hover, {{WRAPPER}} .' . $this->get_name() . ' .added_to_cart:hover',
1159 ]
1160 );
1161
1162 $this->add_control(
1163 'button_hover_border_color',
1164 [
1165 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1166 'type' => Controls_Manager::COLOR,
1167 'condition' => [
1168 'btn_border_border!' => '',
1169 ],
1170 'selectors' => [
1171 '{{WRAPPER}} .' . $this->get_name() . ' .usk-button:hover' => 'border-color: {{VALUE}};',
1172 '{{WRAPPER}} .' . $this->get_name() . ' .added_to_cart:hover' => 'border-color: {{VALUE}};',
1173 ],
1174 ]
1175 );
1176 $this->end_controls_tab();
1177 $this->end_controls_tabs();
1178 $this->end_controls_section();
1179 }
1180
1181 protected function register_global_controls_category() {
1182 $this->start_controls_section(
1183 'section_style_category',
1184 [
1185 'label' => esc_html__('Category', 'ultimate-store-kit'),
1186 'tab' => Controls_Manager::TAB_STYLE,
1187 'condition' => [
1188 'show_category' => 'yes',
1189 ],
1190 ]
1191 );
1192 $this->start_controls_tabs(
1193 'category_tabs'
1194 );
1195 $this->start_controls_tab(
1196 'category_tab_normal',
1197 [
1198 'label' => esc_html__('Normal', 'ultimate-store-kit'),
1199 ]
1200 );
1201 $this->add_control(
1202 'category_color',
1203 [
1204 'label' => esc_html__('Color', 'ultimate-store-kit'),
1205 'type' => Controls_Manager::COLOR,
1206 'selectors' => [
1207 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a' => 'color: {{VALUE}};',
1208 ],
1209 ]
1210 );
1211 $this->add_group_control(
1212 Group_Control_Background::get_type(),
1213 [
1214 'name' => 'category_bg_color',
1215 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a',
1216 ]
1217 );
1218 $this->add_group_control(
1219 Group_Control_Border::get_type(),
1220 [
1221 'name' => 'category_border',
1222 'label' => __('Border', 'elementor'),
1223 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a',
1224 'separator' => 'before'
1225 ]
1226 );
1227 $this->add_responsive_control(
1228 'category_radius',
1229 [
1230 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1231 'type' => Controls_Manager::DIMENSIONS,
1232 'size_units' => ['px', '%', 'em'],
1233 'selectors' => [
1234 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1235 ],
1236 ]
1237 );
1238 $this->add_responsive_control(
1239 'category_padding',
1240 [
1241 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1242 'type' => Controls_Manager::DIMENSIONS,
1243 'size_units' => ['px', '%'],
1244 'selectors' => [
1245 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1246 ],
1247 ]
1248 );
1249 $this->add_responsive_control(
1250 'category_margin',
1251 [
1252 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1253 'type' => Controls_Manager::DIMENSIONS,
1254 'size_units' => ['px', '%'],
1255 'selectors' => [
1256 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1257 ],
1258 ]
1259 );
1260
1261 $this->add_responsive_control(
1262 'category_space_between',
1263 [
1264 'label' => esc_html__('Space Between', 'ultimate-store-kit'),
1265 'type' => Controls_Manager::SLIDER,
1266 'size_units' => ['px', 'em', '%'],
1267 'selectors' => [
1268 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category' => 'gap: {{SIZE}}{{UNIT}};',
1269 ],
1270 ]
1271 );
1272 $this->add_group_control(
1273 Group_Control_Typography::get_type(),
1274 [
1275 'name' => 'category_typography',
1276 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1277 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a',
1278 ]
1279 );
1280 $this->add_group_control(
1281 Group_Control_Box_Shadow::get_type(),
1282 [
1283 'name' => 'category_shadow',
1284 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a',
1285 ]
1286 );
1287 $this->end_controls_tab();
1288 $this->start_controls_tab(
1289 'category_tab_hover',
1290 [
1291 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1292 ]
1293 );
1294 $this->add_control(
1295 'hover_category_color',
1296 [
1297 'label' => esc_html__('Color', 'ultimate-store-kit'),
1298 'type' => Controls_Manager::COLOR,
1299 'selectors' => [
1300 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a:hover' => 'color: {{VALUE}};',
1301 ],
1302 ]
1303 );
1304 $this->add_group_control(
1305 Group_Control_Background::get_type(),
1306 [
1307 'name' => 'hover_category_bg_color',
1308 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a:hover',
1309 ]
1310 );
1311 $this->add_control(
1312 'hover_category_border_color',
1313 [
1314 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1315 'type' => Controls_Manager::COLOR,
1316 'selectors' => [
1317 '{{WRAPPER}} .' . $this->get_name() . ' .usk-category a:hover' => 'border-color: {{VALUE}};',
1318 ],
1319 'condition' => [
1320 'category_border_border!' => ''
1321 ],
1322 'separator' => 'before'
1323 ]
1324 );
1325 $this->end_controls_tab();
1326 $this->end_controls_tabs();
1327 $this->end_controls_section();
1328 }
1329
1330 protected function register_global_controls_excerpt() {
1331 $this->start_controls_section(
1332 'section_style_excerpt',
1333 [
1334 'label' => esc_html__('Text', 'ultimate-store-kit'),
1335 'tab' => Controls_Manager::TAB_STYLE,
1336 'condition' => [
1337 'show_excerpt' => 'yes',
1338 'layout_style' => 'list'
1339 ]
1340 ]
1341 );
1342
1343 $this->add_control(
1344 'excerpt_color',
1345 [
1346 'label' => esc_html__('Color', 'ultimate-store-kit'),
1347 'type' => Controls_Manager::COLOR,
1348 'selectors' => [
1349 '{{WRAPPER}} .usk-list-layout .usk-desc' => 'color: {{VALUE}}',
1350 ],
1351 ]
1352 );
1353
1354 $this->add_responsive_control(
1355 'excerpt_padding',
1356 [
1357 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1358 'type' => Controls_Manager::DIMENSIONS,
1359 'size_units' => ['px', '%'],
1360 'selectors' => [
1361 '{{WRAPPER}} .usk-list-layout .usk-desc' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1362 ],
1363 ]
1364 );
1365
1366 $this->add_responsive_control(
1367 'excerpt_margin',
1368 [
1369 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1370 'type' => Controls_Manager::DIMENSIONS,
1371 'size_units' => ['px', '%'],
1372 'selectors' => [
1373 '{{WRAPPER}} .usk-list-layout .usk-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1374 ],
1375 ]
1376 );
1377 $this->add_group_control(
1378 Group_Control_Typography::get_type(),
1379 [
1380 'name' => 'excerpt_typography',
1381 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1382 'selector' => '{{WRAPPER}} .usk-list-layout .usk-desc',
1383 ]
1384 );
1385
1386 $this->end_controls_section();
1387 }
1388 protected function register_global_controls_price() {
1389 $this->start_controls_section(
1390 'section_style_price',
1391 [
1392 'label' => esc_html__('Price', 'ultimate-store-kit'),
1393 'tab' => Controls_Manager::TAB_STYLE,
1394 'condition' => [
1395 'show_price' => 'yes',
1396 ],
1397 ]
1398 );
1399 $this->add_control(
1400 'regular_price_color',
1401 [
1402 'label' => esc_html__('Regular Color', 'ultimate-store-kit'),
1403 'type' => Controls_Manager::COLOR,
1404 'selectors' => [
1405 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price del .woocommerce-Price-amount.amount' => 'color: {{VALUE}};',
1406 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price del' => 'color: {{VALUE}};',
1407 ],
1408
1409 ]
1410 );
1411 $this->add_control(
1412 'sale_price_color',
1413 [
1414 'label' => esc_html__('Sale Color', 'ultimate-store-kit'),
1415 'type' => Controls_Manager::COLOR,
1416 'selectors' => [
1417 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price' => 'color: {{VALUE}}',
1418 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price ins span' => 'color: {{VALUE}}',
1419 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price .woocommerce-Price-amount.amount' => 'color: {{VALUE}}',
1420 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price > .woocommerce-Price-amount.amount bdi' => 'color: {{VALUE}}',
1421 ],
1422 ]
1423 );
1424
1425 $this->add_responsive_control(
1426 'price_margin',
1427 [
1428 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1429 'type' => Controls_Manager::DIMENSIONS,
1430 'size_units' => ['px', '%'],
1431 'selectors' => [
1432 '{{WRAPPER}} .' . $this->get_name() . ' .usk-price' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1433 ],
1434 ]
1435 );
1436
1437 $this->add_group_control(
1438 Group_Control_Typography::get_type(),
1439 [
1440 'name' => 'sale_price_typography',
1441 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1442 'selector' => '
1443 {{WRAPPER}} .' . $this->get_name() . ' .usk-price',
1444 ]
1445 );
1446
1447 $this->end_controls_section();
1448 }
1449 protected function register_global_controls_rating() {
1450 $this->start_controls_section(
1451 'section_style_rating',
1452 [
1453 'label' => esc_html__('Rating', 'ultimate-store-kit'),
1454 'tab' => Controls_Manager::TAB_STYLE,
1455 'condition' => [
1456 'show_rating' => 'yes',
1457 ],
1458 ]
1459 );
1460 $this->add_control(
1461 'rating_color',
1462 [
1463 'label' => esc_html__('Color', 'ultimate-store-kit'),
1464 'type' => Controls_Manager::COLOR,
1465 'default' => '#e7e7e7',
1466 'selectors' => [
1467 '{{WRAPPER}} .' . $this->get_name() . ' .usk-rating .star-rating::before' => 'color: {{VALUE}};',
1468 ],
1469 ]
1470 );
1471
1472 $this->add_control(
1473 'active_rating_color',
1474 [
1475 'label' => esc_html__('Active Color', 'ultimate-store-kit'),
1476 'type' => Controls_Manager::COLOR,
1477 'default' => '#FFCC00',
1478 'selectors' => [
1479 '{{WRAPPER}} .' . $this->get_name() . ' .usk-rating .star-rating span::before' => 'color: {{VALUE}};',
1480 ],
1481 ]
1482 );
1483
1484 $this->end_controls_section();
1485 }
1486 protected function register_global_controls_action_btn() {
1487 $this->start_controls_section(
1488 'style_action_btn',
1489 [
1490 'label' => esc_html__('Action Button', 'ultimate-store-kit'),
1491 'tab' => Controls_Manager::TAB_STYLE,
1492 'conditions' => [
1493 'relation' => 'or',
1494 'terms' => [
1495 [
1496 'name' => 'show_cart',
1497 'value' => 'yes'
1498 ],
1499 [
1500 'name' => 'show_wishlist',
1501 'value' => 'yes'
1502 ],
1503 [
1504 'name' => 'show_quick_view',
1505 'value' => 'yes'
1506 ],
1507 [
1508 'name' => 'show_compare',
1509 'value' => 'yes'
1510 ]
1511 ]
1512 ]
1513 ]
1514 );
1515 $this->add_group_control(
1516 Group_Control_Border::get_type(),
1517 [
1518 'name' => 'action_btn_border',
1519 'label' => esc_html__('Border', 'ultimate-store-kit'),
1520 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping a',
1521 'separator' => 'before'
1522 ]
1523 );
1524 $this->add_responsive_control(
1525 'action_btn_radius',
1526 [
1527 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
1528 'type' => Controls_Manager::DIMENSIONS,
1529 'size_units' => ['px', '%', 'em'],
1530 'selectors' => [
1531 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1532 ],
1533 ]
1534 );
1535 $this->add_responsive_control(
1536 'action_btn_padding',
1537 [
1538 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1539 'type' => Controls_Manager::DIMENSIONS,
1540 'size_units' => ['px', '%', 'em'],
1541 'selectors' => [
1542 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1543 ],
1544 ]
1545 );
1546 $this->add_responsive_control(
1547 'action_btn_margin',
1548 [
1549 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1550 'type' => Controls_Manager::DIMENSIONS,
1551 'size_units' => ['px', '%', 'em'],
1552 'selectors' => [
1553 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping a' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1554 ],
1555 ]
1556 );
1557 $this->add_responsive_control(
1558 'action_btn_size',
1559 [
1560 'label' => __('Icon Size', 'ultimate-store-kit'),
1561 'type' => Controls_Manager::SLIDER,
1562 'size_units' => ['px'],
1563 'range' => [
1564 'px' => [
1565 'min' => 0,
1566 'max' => 50,
1567 'step' => 1,
1568 ]
1569 ],
1570 'selectors' => [
1571 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping a .icon' => 'font-size: {{SIZE}}{{UNIT}};',
1572 ],
1573 ]
1574 );
1575 $this->add_control(
1576 'font_family',
1577 [
1578 'label' => esc_html__('Tooltip Font', 'font family'),
1579 'type' => Controls_Manager::FONT,
1580 'selectors' => [
1581 '{{WRAPPER}} .usk-shoping a' => 'font-family: {{VALUE}}',
1582 ],
1583 ]
1584 );
1585 $this->start_controls_tabs(
1586 'action_btn_tabs'
1587 );
1588 $this->start_controls_tab(
1589 'wishlist_tab',
1590 [
1591 'label' => esc_html__('Wishlist', 'ultimate-store-kit'),
1592 'condition' => [
1593 'show_wishlist' => 'yes'
1594 ]
1595 ]
1596 );
1597 $this->add_control(
1598 'wishlist_normal_color',
1599 [
1600 'label' => esc_html__('Color', 'ultimate-store-kit'),
1601 'type' => Controls_Manager::COLOR,
1602 'selectors' => [
1603 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist' => 'color: {{VALUE}}',
1604 ],
1605 ]
1606 );
1607 $this->add_control(
1608 'wishlist_icon_bg',
1609 [
1610 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1611 'type' => Controls_Manager::COLOR,
1612 'selectors' => [
1613 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist' => 'background: {{VALUE}}',
1614 ],
1615 ]
1616 );
1617
1618 $this->add_control(
1619 'wishlist_border_color',
1620 [
1621 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1622 'type' => Controls_Manager::COLOR,
1623 'selectors' => [
1624 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist' => 'border-color: {{VALUE}} !important;',
1625 ],
1626 'condition' => [
1627 'action_btn_border_border!' => ''
1628 ]
1629 ]
1630 );
1631 $this->add_control(
1632 'heading_wishlist_hover',
1633 [
1634 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1635 'type' => Controls_Manager::HEADING,
1636 'separator' => 'before',
1637 ]
1638 );
1639 $this->add_control(
1640 'wishlist_hover_color',
1641 [
1642 'label' => esc_html__('Color', 'ultimate-store-kit'),
1643 'type' => Controls_Manager::COLOR,
1644 'selectors' => [
1645 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist:hover' => 'color: {{VALUE}}',
1646 ],
1647 ]
1648 );
1649 $this->add_control(
1650 'wishlist_icon_hover_bg',
1651 [
1652 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1653 'type' => Controls_Manager::COLOR,
1654 'selectors' => [
1655 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist:hover' => 'background: {{VALUE}}',
1656 ],
1657 ]
1658 );
1659
1660 $this->add_control(
1661 'wishlist_border_hover_color',
1662 [
1663 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1664 'type' => Controls_Manager::COLOR,
1665 'selectors' => [
1666 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist:hover' => 'border-color: {{VALUE}} !important;',
1667 ],
1668 'condition' => [
1669 'action_btn_border_border!' => ''
1670 ]
1671 ]
1672 );
1673
1674 $this->add_control(
1675 'heading_wishlist_active',
1676 [
1677 'label' => esc_html__('Active', 'ultimate-store-kit'),
1678 'type' => Controls_Manager::HEADING,
1679 'separator' => 'before',
1680 ]
1681 );
1682 $this->add_control(
1683 'wishlist_active_color',
1684 [
1685 'label' => esc_html__('Color', 'ultimate-store-kit'),
1686 'type' => Controls_Manager::COLOR,
1687 'selectors' => [
1688 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist.usk-active' => 'color: {{VALUE}}',
1689 ],
1690 ]
1691 );
1692 $this->add_control(
1693 'wishlist_active_bg',
1694 [
1695 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1696 'type' => Controls_Manager::COLOR,
1697 'selectors' => [
1698 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist.usk-active' => 'background: {{VALUE}}',
1699 ],
1700 ]
1701 );
1702 $this->add_control(
1703 'wishlist_active_border_color',
1704 [
1705 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1706 'type' => Controls_Manager::COLOR,
1707 'selectors' => [
1708 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-wishlist.usk-active' => 'border-color: {{VALUE}} !important;',
1709 ],
1710 'condition' => [
1711 'action_btn_border_border!' => ''
1712 ]
1713 ]
1714 );
1715 $this->end_controls_tab();
1716 $this->start_controls_tab(
1717 'compare_tab',
1718 [
1719 'label' => esc_html__('Compare', 'ultimate-store-kit'),
1720 'condition' => [
1721 'show_compare' => 'yes'
1722 ]
1723 ]
1724 );
1725 $this->add_control(
1726 'compare_color',
1727 [
1728 'label' => esc_html__('Color', 'ultimate-store-kit'),
1729 'type' => Controls_Manager::COLOR,
1730 'selectors' => [
1731 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare' => 'color: {{VALUE}}',
1732 ],
1733 ]
1734 );
1735 $this->add_control(
1736 'compare_icon_bg',
1737 [
1738 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1739 'type' => Controls_Manager::COLOR,
1740 'selectors' => [
1741 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare' => 'background: {{VALUE}}',
1742 ],
1743 ]
1744 );
1745 $this->add_control(
1746 'compare_border_color',
1747 [
1748 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1749 'type' => Controls_Manager::COLOR,
1750 'selectors' => [
1751 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare' => 'border-color: {{VALUE}} !important;',
1752 ],
1753 'condition' => [
1754 'action_btn_border_border!' => ''
1755 ]
1756 ]
1757 );
1758 $this->add_control(
1759 'heading_compare_hover',
1760 [
1761 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1762 'type' => Controls_Manager::HEADING,
1763 'separator' => 'before',
1764 ]
1765 );
1766 $this->add_control(
1767 'compare_color_hover',
1768 [
1769 'label' => esc_html__('Color', 'ultimate-store-kit'),
1770 'type' => Controls_Manager::COLOR,
1771 'selectors' => [
1772 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare:hover' => 'color: {{VALUE}}',
1773 ],
1774 ]
1775 );
1776 $this->add_control(
1777 'compare_icon_bg_hover',
1778 [
1779 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1780 'type' => Controls_Manager::COLOR,
1781 'selectors' => [
1782 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare:hover' => 'background: {{VALUE}}',
1783 ],
1784 ]
1785 );
1786 $this->add_control(
1787 'compare_border_hover_color',
1788 [
1789 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1790 'type' => Controls_Manager::COLOR,
1791 'selectors' => [
1792 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare:hover' => 'border-color: {{VALUE}} !important;',
1793 ],
1794 'condition' => [
1795 'action_btn_border_border!' => ''
1796 ]
1797 ]
1798 );
1799 $this->add_control(
1800 'heading_compare_active',
1801 [
1802 'label' => esc_html__('Active', 'ultimate-store-kit'),
1803 'type' => Controls_Manager::HEADING,
1804 'separator' => 'before',
1805 ]
1806 );
1807 $this->add_control(
1808 'compare_color_active',
1809 [
1810 'label' => esc_html__('Color', 'ultimate-store-kit'),
1811 'type' => Controls_Manager::COLOR,
1812 'selectors' => [
1813 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare.usk-active' => 'color: {{VALUE}}',
1814 ],
1815 ]
1816 );
1817 $this->add_control(
1818 'compare_icon_bg_active',
1819 [
1820 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1821 'type' => Controls_Manager::COLOR,
1822 'selectors' => [
1823 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare.usk-active' => 'background: {{VALUE}}',
1824 ],
1825 ]
1826 );
1827 $this->add_control(
1828 'compare_border_active_color',
1829 [
1830 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1831 'type' => Controls_Manager::COLOR,
1832 'selectors' => [
1833 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-compare.usk-active' => 'border-color: {{VALUE}} !important;',
1834 ],
1835 'condition' => [
1836 'action_btn_border_border!' => ''
1837 ]
1838 ]
1839 );
1840 $this->end_controls_tab();
1841 $this->start_controls_tab(
1842 'quickview_tab',
1843 [
1844 'label' => esc_html__('Quickview', 'ultimate-store-kit'),
1845 'condition' => [
1846 'show_quick_view' => 'yes'
1847 ]
1848 ]
1849 );
1850 $this->add_control(
1851 'quickview_color',
1852 [
1853 'label' => esc_html__('Color', 'ultimate-store-kit'),
1854 'type' => Controls_Manager::COLOR,
1855 'selectors' => [
1856 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-quickview' => 'color: {{VALUE}}',
1857 ],
1858 ]
1859 );
1860 $this->add_control(
1861 'quickview_icon_bg',
1862 [
1863 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1864 'type' => Controls_Manager::COLOR,
1865 'selectors' => [
1866 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-quickview' => 'background: {{VALUE}}',
1867 ],
1868 ]
1869 );
1870 $this->add_control(
1871 'quickview_border_color',
1872 [
1873 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1874 'type' => Controls_Manager::COLOR,
1875 'selectors' => [
1876 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-quickview' => 'border-color: {{VALUE}} !important;',
1877 ],
1878 'condition' => [
1879 'action_btn_border_border!' => ''
1880 ]
1881 ]
1882 );
1883 $this->add_control(
1884 'heading_quickview_hover',
1885 [
1886 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1887 'type' => Controls_Manager::HEADING,
1888 'separator' => 'before',
1889 ]
1890 );
1891 $this->add_control(
1892 'quickview_color_hover',
1893 [
1894 'label' => esc_html__('Color', 'ultimate-store-kit'),
1895 'type' => Controls_Manager::COLOR,
1896 'selectors' => [
1897 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-quickview:hover' => 'color: {{VALUE}}',
1898 ],
1899 ]
1900 );
1901 $this->add_control(
1902 'quickview_icon_bg_hover',
1903 [
1904 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1905 'type' => Controls_Manager::COLOR,
1906 'selectors' => [
1907 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-quickview:hover' => 'background: {{VALUE}}',
1908 ],
1909 ]
1910 );
1911 $this->add_control(
1912 'quickview_border_hover_color',
1913 [
1914 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1915 'type' => Controls_Manager::COLOR,
1916 'selectors' => [
1917 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-shoping-icon-quickview:hover' => 'border-color: {{VALUE}} !important;',
1918 ],
1919 'condition' => [
1920 'action_btn_border_border!' => ''
1921 ]
1922 ]
1923 );
1924 $this->end_controls_tab();
1925
1926 if ($this->get_name() !== 'usk-shiny-grid' && $this->get_name() !== 'usk-shiny-carousel') :
1927 $this->start_controls_tab(
1928 'add_to_cart_tab',
1929 [
1930 'label' => esc_html__('Cart', 'ultimate-store-kit'),
1931 'condition' => [
1932 'show_cart' => 'yes'
1933 ]
1934 ]
1935 );
1936 $this->add_control(
1937 'cart_color',
1938 [
1939 'label' => esc_html__('Color', 'ultimate-store-kit'),
1940 'type' => Controls_Manager::COLOR,
1941 'selectors' => [
1942 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-cart' => 'color: {{VALUE}}',
1943 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .added_to_cart' => 'color: {{VALUE}}',
1944 ],
1945 ]
1946 );
1947 $this->add_control(
1948 'cart_icon_bg',
1949 [
1950 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1951 'type' => Controls_Manager::COLOR,
1952 'selectors' => [
1953 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-cart' => 'background: {{VALUE}}',
1954 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .added_to_cart' => 'background: {{VALUE}}',
1955 ],
1956 ]
1957 );
1958 $this->add_control(
1959 'cart_border_color',
1960 [
1961 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1962 'type' => Controls_Manager::COLOR,
1963 'selectors' => [
1964 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-cart' => 'border-color: {{VALUE}} !important;',
1965 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .added_to_cart' => 'border-color: {{VALUE}} !important;',
1966 ],
1967 'condition' => [
1968 'action_btn_border_border!' => ''
1969 ]
1970 ]
1971 );
1972 $this->add_control(
1973 'heading_cart_hover',
1974 [
1975 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1976 'type' => Controls_Manager::HEADING,
1977 'separator' => 'before',
1978 ]
1979 );
1980 $this->add_control(
1981 'cart_color_hover',
1982 [
1983 'label' => esc_html__('Color', 'ultimate-store-kit'),
1984 'type' => Controls_Manager::COLOR,
1985 'selectors' => [
1986 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-cart:hover' => 'color: {{VALUE}}',
1987 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .added_to_cart:hover' => 'color: {{VALUE}}',
1988 ],
1989 ]
1990 );
1991 $this->add_control(
1992 'cart_icon_bg_hover',
1993 [
1994 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
1995 'type' => Controls_Manager::COLOR,
1996 'selectors' => [
1997 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-cart:hover' => 'background: {{VALUE}}',
1998 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .added_to_cart:hover' => 'background: {{VALUE}}',
1999 ],
2000 ]
2001 );
2002 $this->add_control(
2003 'cart_border_hover_color',
2004 [
2005 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2006 'type' => Controls_Manager::COLOR,
2007 'selectors' => [
2008 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .usk-cart:hover' => 'border-color: {{VALUE}} !important;',
2009 '{{WRAPPER}} .' . $this->get_name() . ' .usk-shoping .added_to_cart:hover' => 'border-color: {{VALUE}} !important;',
2010 ],
2011 'condition' => [
2012 'action_btn_border_border!' => ''
2013 ]
2014 ]
2015 );
2016 $this->end_controls_tab();
2017 endif;
2018 $this->end_controls_tabs();
2019 $this->end_controls_section();
2020 }
2021 protected function register_global_controls_grid_pagination() {
2022 $this->start_controls_section(
2023 'section_style_pagination',
2024 [
2025 'label' => esc_html__('Pagination', 'ultimate-store-kit'),
2026 'tab' => Controls_Manager::TAB_STYLE,
2027 'condition' => [
2028 'show_pagination' => 'yes',
2029 ],
2030 ]
2031 );
2032 $this->add_control(
2033 'pagination_alignment',
2034 [
2035 'label' => esc_html__('Alignment', 'ultimate-store-kit'),
2036 'type' => Controls_Manager::CHOOSE,
2037 'options' => [
2038 'flex-start' => [
2039 'title' => esc_html__('Left', 'ultimate-store-kit'),
2040 'icon' => 'eicon-h-align-left',
2041 ],
2042 'center' => [
2043 'title' => esc_html__('Center', 'ultimate-store-kit'),
2044 'icon' => 'eicon-h-align-center',
2045 ],
2046 'flex-end' => [
2047 'title' => esc_html__('Right', 'ultimate-store-kit'),
2048 'icon' => 'eicon-h-align-right',
2049 ],
2050 ],
2051 'default' => 'flex-start',
2052 'toggle' => false,
2053 'selectors' => [
2054 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination' => 'justify-content: {{VALUE}};',
2055 ],
2056 ]
2057 );
2058 $this->start_controls_tabs(
2059 'pagination_normal'
2060 );
2061 $this->start_controls_tab(
2062 'pagination_tab_normal',
2063 [
2064 'label' => esc_html__('Normal', 'ultimate-store-kit'),
2065 ]
2066 );
2067 $this->add_control(
2068 'pagination_color',
2069 [
2070 'label' => esc_html__('Color', 'ultimate-store-kit'),
2071 'type' => Controls_Manager::COLOR,
2072 'selectors' => [
2073 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li:not(.usk-active) a' => 'color: {{VALUE}};',
2074 ],
2075 ]
2076 );
2077 $this->add_control(
2078 'pagination_background',
2079 [
2080 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
2081 'type' => Controls_Manager::COLOR,
2082 'selectors' => [
2083 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li:not(.usk-active) a' => 'background-color: {{VALUE}};',
2084 ],
2085 ]
2086 );
2087 $this->add_group_control(
2088 Group_Control_Border::get_type(),
2089 [
2090 'name' => 'pagination_border',
2091 'label' => esc_html__('Border', 'ultimate-store-kit'),
2092 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a',
2093 'separator' => 'before'
2094 ]
2095 );
2096
2097 $this->add_responsive_control(
2098 'pagination_padding',
2099 [
2100 'label' => __('Padding', 'ultimate-store-kit'),
2101 'type' => Controls_Manager::DIMENSIONS,
2102 'size_units' => ['px', '%', 'em'],
2103 'selectors' => [
2104 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2105 ],
2106 ]
2107 );
2108 $this->add_responsive_control(
2109 'pagination_radius',
2110 [
2111 'label' => __('Border Radius', 'ultimate-store-kit'),
2112 'type' => Controls_Manager::DIMENSIONS,
2113 'size_units' => ['px', '%', 'em'],
2114 'selectors' => [
2115 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2116 ],
2117 ]
2118 );
2119 $this->add_responsive_control(
2120 'pagination_spacing_top',
2121 [
2122 'label' => esc_html__('Top Spacing', 'ultimate-store-kit'),
2123 'type' => Controls_Manager::SLIDER,
2124 'selectors' => [
2125 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination' => 'margin-top: {{SIZE}}px;',
2126 ],
2127 ]
2128 );
2129 $this->add_responsive_control(
2130 'pagination_spacing',
2131 [
2132 'label' => esc_html__('Space Between', 'ultimate-store-kit'),
2133 'type' => Controls_Manager::SLIDER,
2134 'default' => [
2135 'unit' => 'px',
2136 'size' => 10,
2137 ],
2138 'selectors' => [
2139 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination' => 'gap: {{SIZE}}{{UNIT}};',
2140 ],
2141 ]
2142 );
2143
2144 $this->add_group_control(
2145 Group_Control_Typography::get_type(),
2146 [
2147 'name' => 'pagination_typography',
2148 'label' => esc_html__('Typography', 'ultimate-store-kit'),
2149 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a, {{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a li span',
2150 ]
2151 );
2152
2153 $this->end_controls_tab();
2154 $this->start_controls_tab(
2155 'pagination_tab_hover',
2156 [
2157 'label' => esc_html__('Hover', 'ultimate-store-kit'),
2158 ]
2159 );
2160 $this->add_control(
2161 'hover_pagination_color',
2162 [
2163 'label' => esc_html__('Color', 'ultimate-store-kit'),
2164 'type' => Controls_Manager::COLOR,
2165 'selectors' => [
2166 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a:hover' => 'color: {{VALUE}};',
2167 ],
2168 ]
2169 );
2170 $this->add_control(
2171 'hover_pagination_background',
2172 [
2173 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
2174 'type' => Controls_Manager::COLOR,
2175 'selectors' => [
2176 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a:hover' => 'background:{{VALUE}};',
2177 ],
2178 ]
2179 );
2180 $this->add_control(
2181 'hover_pagination_border_color',
2182 [
2183 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2184 'type' => Controls_Manager::COLOR,
2185 'selectors' => [
2186 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a:hover' => 'border-color:{{VALUE}};',
2187 ],
2188 'condition' => [
2189 'pagination_border_border!' => ''
2190 ],
2191 ]
2192 );
2193
2194 $this->end_controls_tab();
2195 $this->start_controls_tab(
2196 'pagination_tab_active',
2197 [
2198 'label' => esc_html__('Active', 'ultimate-store-kit'),
2199 ]
2200 );
2201 $this->add_control(
2202 'active_pagination_color',
2203 [
2204 'label' => esc_html__('Color', 'ultimate-store-kit'),
2205 'type' => Controls_Manager::COLOR,
2206 'selectors' => [
2207 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li.usk-active a' => 'color: {{VALUE}};',
2208 ],
2209 ]
2210 );
2211 $this->add_control(
2212 'active_pagination_background',
2213 [
2214 'label' => esc_html__('Background Color', 'ultimate-store-kit'),
2215 'type' => Controls_Manager::COLOR,
2216 'selectors' => [
2217 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li.usk-active a' => 'background:{{VALUE}};',
2218 ],
2219 ]
2220 );
2221 $this->add_control(
2222 'active_pagination_border_color',
2223 [
2224 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2225 'type' => Controls_Manager::COLOR,
2226 'selectors' => [
2227 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li.usk-active a' => 'border-color: {{VALUE}};',
2228 ],
2229 'condition' => [
2230 'pagination_border_border!' => ''
2231 ]
2232 ]
2233 );
2234 $this->end_controls_tab();
2235 $this->end_controls_tabs();
2236 $this->end_controls_section();
2237 }
2238
2239 //Badge Controls
2240 protected function register_global_controls_badge() {
2241 $this->start_controls_section(
2242 'badge',
2243 [
2244 'label' => esc_html__('Badge', 'ultimate-store-kit'),
2245 'tab' => Controls_Manager::TAB_STYLE,
2246 ]
2247 );
2248 $this->add_group_control(
2249 Group_Control_Border::get_type(),
2250 [
2251 'name' => 'badge_border',
2252 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge',
2253 ]
2254 );
2255 $this->add_responsive_control(
2256 'badge_radius',
2257 [
2258 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
2259 'type' => Controls_Manager::DIMENSIONS,
2260 'size_units' => ['px', '%', 'em'],
2261 'selectors' => [
2262 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2263 ],
2264 ]
2265 );
2266 $this->add_responsive_control(
2267 'badge_padding',
2268 [
2269 'label' => esc_html__('Padding', 'ultimate-store-kit'),
2270 'type' => Controls_Manager::DIMENSIONS,
2271 'size_units' => ['px', '%', 'em'],
2272 'selectors' => [
2273 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2274 ],
2275 ]
2276 );
2277 $this->add_responsive_control(
2278 'badge_margin',
2279 [
2280 'label' => esc_html__('Margin', 'ultimate-store-kit'),
2281 'type' => Controls_Manager::DIMENSIONS,
2282 'size_units' => ['px', '%', 'em'],
2283 'selectors' => [
2284 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2285 ],
2286 ]
2287 );
2288
2289 $this->add_responsive_control(
2290 'badge_spacing',
2291 [
2292 'label' => esc_html__('Space Between', 'ultimate-store-kit'),
2293 'type' => Controls_Manager::SLIDER,
2294 'default' => [
2295 'unit' => 'px',
2296 'size' => 10,
2297 ],
2298 'selectors' => [
2299 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content' => 'gap: {{SIZE}}{{UNIT}};',
2300 ],
2301 ]
2302 );
2303 $this->add_group_control(
2304 Group_Control_Typography::get_type(),
2305 [
2306 'name' => 'badge_typography',
2307 'label' => esc_html__('Typography', 'ultimate-store-kit'),
2308 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge',
2309 ]
2310 );
2311 $this->start_controls_tabs(
2312 'label_badge_tabs'
2313 );
2314 $this->start_controls_tab(
2315 'sale_badge_tab',
2316 [
2317 'label' => esc_html__('Sale', 'ultimate-store-kit'),
2318 'condition' => [
2319 'show_sale_badge' => 'yes',
2320 ]
2321 ]
2322 );
2323 $this->add_control(
2324 'sale_badge_color',
2325 [
2326 'label' => esc_html__('Color', 'ultimate-store-kit'),
2327 'type' => Controls_Manager::COLOR,
2328 'selectors' => [
2329 '{{WRAPPER}} .' . $this->get_name() . ' .usk-sale-badge .usk-badge' => 'color: {{VALUE}}',
2330 ],
2331 'condition' => [
2332 'show_sale_badge' => 'yes',
2333 ]
2334 ]
2335 );
2336
2337 $this->add_group_control(
2338 Group_Control_Background::get_type(),
2339 [
2340 'name' => 'sale_badge_bg',
2341 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-sale-badge .usk-badge',
2342 'condition' => [
2343 'show_sale_badge' => 'yes',
2344 ]
2345 ]
2346 );
2347
2348 $this->add_control(
2349 'sale_badge_border_color',
2350 [
2351 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2352 'type' => Controls_Manager::COLOR,
2353 'selectors' => [
2354 '{{WRAPPER}} .' . $this->get_name() . ' .usk-sale-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2355 ],
2356 'condition' => [
2357 'show_sale_badge' => 'yes',
2358 'badge_border_border!' => '',
2359 ]
2360 ]
2361 );
2362 $this->end_controls_tab();
2363 $this->start_controls_tab(
2364 'discount_badge_tab',
2365 [
2366 'label' => esc_html__('Discount', 'ultimate-store-kit'),
2367 'condition' => [
2368 'show_discount_badge' => 'yes',
2369 ],
2370 ]
2371 );
2372 $this->add_control(
2373 'discount_badge_color',
2374 [
2375 'label' => esc_html__('Color', 'ultimate-store-kit'),
2376 'type' => Controls_Manager::COLOR,
2377 'selectors' => [
2378 '{{WRAPPER}} .' . $this->get_name() . ' .usk-percantage-badge .usk-badge' => 'color: {{VALUE}}',
2379 ],
2380 'condition' => [
2381 'show_discount_badge' => 'yes',
2382 ],
2383 ]
2384 );
2385
2386 $this->add_group_control(
2387 Group_Control_Background::get_type(),
2388 [
2389 'name' => 'discount_badge_bg',
2390 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-percantage-badge .usk-badge',
2391 'condition' => [
2392 'show_discount_badge' => 'yes',
2393 ],
2394 ]
2395 );
2396
2397 $this->add_control(
2398 'discount_badge_border_color',
2399 [
2400 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2401 'type' => Controls_Manager::COLOR,
2402 'selectors' => [
2403 '{{WRAPPER}} .' . $this->get_name() . ' .usk-percantage-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2404 ],
2405 'condition' => [
2406 'show_discount_badge' => 'yes',
2407 'badge_border_border!' => '',
2408 ],
2409 ]
2410 );
2411 $this->end_controls_tab();
2412 $this->start_controls_tab(
2413 'stock_badge_tab',
2414 [
2415 'label' => esc_html__('Stock', 'ultimate-store-kit'),
2416 'condition' => [
2417 'show_stock_status' => 'yes',
2418 ],
2419 ]
2420 );
2421 $this->add_control(
2422 'stock_badge_color',
2423 [
2424 'label' => esc_html__('Color', 'ultimate-store-kit'),
2425 'type' => Controls_Manager::COLOR,
2426 'selectors' => [
2427 '{{WRAPPER}} .' . $this->get_name() . ' .usk-stock-status-badge .usk-badge' => 'color: {{VALUE}}',
2428 ],
2429 'condition' => [
2430 'show_stock_status' => 'yes',
2431 ],
2432 ]
2433 );
2434 $this->add_group_control(
2435 Group_Control_Background::get_type(),
2436 [
2437 'name' => 'stock_badge_bg',
2438 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-stock-status-badge .usk-badge',
2439 'condition' => [
2440 'show_stock_status' => 'yes',
2441 ],
2442 ]
2443 );
2444
2445 $this->add_control(
2446 'stock_badge_border_color',
2447 [
2448 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2449 'type' => Controls_Manager::COLOR,
2450 'selectors' => [
2451 '{{WRAPPER}} .' . $this->get_name() . ' .usk-stock-status-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2452 ],
2453 'condition' => [
2454 'show_stock_status' => 'yes',
2455 'badge_border_border!' => '',
2456 ],
2457 ]
2458 );
2459 $this->end_controls_tab();
2460 $this->start_controls_tab(
2461 'trending_badge_tab',
2462 [
2463 'label' => esc_html__('Trending', 'ultimate-store-kit'),
2464 'condition' => [
2465 'show_trending_badge' => 'yes',
2466 ],
2467 ]
2468 );
2469 $this->add_control(
2470 'trending_badge_color',
2471 [
2472 'label' => esc_html__('Color', 'ultimate-store-kit'),
2473 'type' => Controls_Manager::COLOR,
2474 'selectors' => [
2475 '{{WRAPPER}} .' . $this->get_name() . ' .usk-trending-badge .usk-badge' => 'color: {{VALUE}}',
2476 ],
2477 'condition' => [
2478 'show_trending_badge' => 'yes',
2479 ],
2480 ]
2481 );
2482 $this->add_group_control(
2483 Group_Control_Background::get_type(),
2484 [
2485 'name' => 'trending_badge_bg',
2486 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-trending-badge .usk-badge',
2487 'condition' => [
2488 'show_trending_badge' => 'yes',
2489 ],
2490 ]
2491 );
2492
2493 $this->add_control(
2494 'trending_badge_border_color',
2495 [
2496 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2497 'type' => Controls_Manager::COLOR,
2498 'selectors' => [
2499 '{{WRAPPER}} .' . $this->get_name() . ' .usk-trending-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2500 ],
2501 'condition' => [
2502 'show_trending_badge' => 'yes',
2503 'badge_border_border!' => '',
2504 ],
2505 ]
2506 );
2507 $this->end_controls_tab();
2508 $this->start_controls_tab(
2509 'new_badge_tab',
2510 [
2511 'label' => esc_html__('New', 'ultimate-store-kit'),
2512 'condition' => [
2513 'show_new_badge' => 'yes',
2514 ],
2515 ]
2516 );
2517 $this->add_control(
2518 'new_badge_color',
2519 [
2520 'label' => esc_html__('Color', 'ultimate-store-kit'),
2521 'type' => Controls_Manager::COLOR,
2522 'selectors' => [
2523 '{{WRAPPER}} .' . $this->get_name() . ' .usk-new-badge .usk-badge' => 'color: {{VALUE}}',
2524 ],
2525 'condition' => [
2526 'show_new_badge' => 'yes',
2527 ],
2528 ]
2529 );
2530
2531 $this->add_group_control(
2532 Group_Control_Background::get_type(),
2533 [
2534 'name' => 'new_badge_bg',
2535 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-new-badge .usk-badge',
2536 'condition' => [
2537 'show_new_badge' => 'yes',
2538 ],
2539 ]
2540 );
2541
2542 $this->add_control(
2543 'new_badge_border_color',
2544 [
2545 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2546 'type' => Controls_Manager::COLOR,
2547 'selectors' => [
2548 '{{WRAPPER}} .' . $this->get_name() . ' .usk-new-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2549 ],
2550 'condition' => [
2551 'show_new_badge' => 'yes',
2552 'badge_border_border!' => '',
2553 ],
2554 ]
2555 );
2556 $this->end_controls_tab();
2557 $this->end_controls_tabs();
2558 $this->end_controls_section();
2559 }
2560 protected function register_global_controls_carousel_navigation() {
2561 $this->start_controls_section(
2562 'section_content_navigation',
2563 [
2564 'label' => __('Navigation', 'ultimate-store-kit'),
2565 ]
2566 );
2567
2568 $this->add_control(
2569 'navigation',
2570 [
2571 'label' => __('Navigation', 'ultimate-store-kit'),
2572 'type' => Controls_Manager::SELECT,
2573 'default' => 'arrows',
2574 'options' => [
2575 'both' => esc_html__('Arrows and Dots', 'ultimate-store-kit'),
2576 'arrows-fraction' => esc_html__('Arrows and Fraction', 'ultimate-store-kit'),
2577 'arrows' => esc_html__('Arrows', 'ultimate-store-kit'),
2578 'dots' => esc_html__('Dots', 'ultimate-store-kit'),
2579 'progressbar' => esc_html__('Progress', 'ultimate-store-kit'),
2580 'none' => esc_html__('None', 'ultimate-store-kit'),
2581 ],
2582 'prefix_class' => 'usk-navigation-type-',
2583 'render_type' => 'template',
2584 ]
2585 );
2586
2587 $this->add_control(
2588 'both_position',
2589 [
2590 'label' => __('Arrows and Dots Position', 'ultimate-store-kit'),
2591 'type' => Controls_Manager::SELECT,
2592 'default' => 'center',
2593 'options' => ultimate_store_kit_navigation_position(),
2594 'condition' => [
2595 'navigation' => 'both',
2596 ],
2597 ]
2598 );
2599
2600 $this->add_control(
2601 'arrows_fraction_position',
2602 [
2603 'label' => __('Arrows and Fraction Position', 'ultimate-store-kit'),
2604 'type' => Controls_Manager::SELECT,
2605 'default' => 'center',
2606 'options' => ultimate_store_kit_navigation_position(),
2607 'condition' => [
2608 'navigation' => 'arrows-fraction',
2609 ],
2610 ]
2611 );
2612
2613 $this->add_control(
2614 'arrows_position',
2615 [
2616 'label' => __('Arrows Position', 'ultimate-store-kit'),
2617 'type' => Controls_Manager::SELECT,
2618 'default' => 'center',
2619 'options' => ultimate_store_kit_navigation_position(),
2620 'condition' => [
2621 'navigation' => 'arrows',
2622 ],
2623 ]
2624 );
2625
2626 $this->add_control(
2627 'dots_position',
2628 [
2629 'label' => __('Dots Position', 'ultimate-store-kit'),
2630 'type' => Controls_Manager::SELECT,
2631 'default' => 'bottom-center',
2632 'options' => ultimate_store_kit_pagination_position(),
2633 'condition' => [
2634 'navigation' => 'dots',
2635 ],
2636
2637 ]
2638 );
2639
2640 $this->add_control(
2641 'progress_position',
2642 [
2643 'label' => __('Progress Position', 'ultimate-store-kit'),
2644 'type' => Controls_Manager::SELECT,
2645 'default' => 'bottom',
2646 'options' => [
2647 'bottom' => esc_html__('Bottom', 'ultimate-store-kit'),
2648 'top' => esc_html__('Top', 'ultimate-store-kit'),
2649 ],
2650 'condition' => [
2651 'navigation' => 'progressbar',
2652 ],
2653 ]
2654 );
2655
2656 $this->add_control(
2657 'dynamic_bullets',
2658 [
2659 'label' => __('Dynamic Bullets?', 'ultimate-store-kit'),
2660 'type' => Controls_Manager::SWITCHER,
2661 'condition' => [
2662 'navigation' => ['dots', 'both'],
2663 ],
2664 ]
2665 );
2666
2667 $this->add_control(
2668 'show_scrollbar',
2669 [
2670 'label' => __('Show Scrollbar?', 'ultimate-store-kit'),
2671 'type' => Controls_Manager::SWITCHER,
2672 ]
2673 );
2674
2675 $this->add_control(
2676 'nav_arrows_icon',
2677 [
2678 'label' => esc_html__('Arrows Icon', 'ultimate-store-kit'),
2679 'type' => Controls_Manager::SELECT,
2680 'default' => '5',
2681 'options' => [
2682 '1' => esc_html__('Style 1', 'ultimate-store-kit'),
2683 '2' => esc_html__('Style 2', 'ultimate-store-kit'),
2684 '3' => esc_html__('Style 3', 'ultimate-store-kit'),
2685 '4' => esc_html__('Style 4', 'ultimate-store-kit'),
2686 '5' => esc_html__('Style 5', 'ultimate-store-kit'),
2687 '6' => esc_html__('Style 6', 'ultimate-store-kit'),
2688 '7' => esc_html__('Style 7', 'ultimate-store-kit'),
2689 '8' => esc_html__('Style 8', 'ultimate-store-kit'),
2690 '9' => esc_html__('Style 9', 'ultimate-store-kit'),
2691 '10' => esc_html__('Style 10', 'ultimate-store-kit'),
2692 '11' => esc_html__('Style 11', 'ultimate-store-kit'),
2693 '12' => esc_html__('Style 12', 'ultimate-store-kit'),
2694 '13' => esc_html__('Style 13', 'ultimate-store-kit'),
2695 '14' => esc_html__('Style 14', 'ultimate-store-kit'),
2696 '15' => esc_html__('Style 15', 'ultimate-store-kit'),
2697 '16' => esc_html__('Style 16', 'ultimate-store-kit'),
2698 '17' => esc_html__('Style 17', 'ultimate-store-kit'),
2699 '18' => esc_html__('Style 18', 'ultimate-store-kit'),
2700 'circle-1' => esc_html__('Style 19', 'ultimate-store-kit'),
2701 'circle-2' => esc_html__('Style 20', 'ultimate-store-kit'),
2702 'circle-3' => esc_html__('Style 21', 'ultimate-store-kit'),
2703 'circle-4' => esc_html__('Style 22', 'ultimate-store-kit'),
2704 'square-1' => esc_html__('Style 23', 'ultimate-store-kit'),
2705 ],
2706 'condition' => [
2707 'navigation' => ['arrows-fraction', 'both', 'arrows'],
2708 ],
2709 ]
2710 );
2711
2712 $this->add_control(
2713 'hide_arrow_on_mobile',
2714 [
2715 'label' => __('Hide Arrows on Mobile', 'ultimate-store-kit'),
2716 'type' => Controls_Manager::SWITCHER,
2717 'default' => 'yes',
2718 'condition' => [
2719 'navigation' => ['arrows-fraction', 'arrows', 'both'],
2720 ],
2721 ]
2722 );
2723
2724 $this->end_controls_section();
2725 }
2726 protected function register_global_controls_navigation_style() {
2727 $this->start_controls_section(
2728 'section_style_navigation',
2729 [
2730 'label' => __('Navigation', 'ultimate-store-kit'),
2731 'tab' => Controls_Manager::TAB_STYLE,
2732 'conditions' => [
2733 'relation' => 'or',
2734 'terms' => [
2735 [
2736 'name' => 'navigation',
2737 'operator' => '!=',
2738 'value' => 'none',
2739 ],
2740 [
2741 'name' => 'show_scrollbar',
2742 'value' => 'yes',
2743 ],
2744 ],
2745 ],
2746 ]
2747 );
2748
2749 $this->add_control(
2750 'arrows_heading',
2751 [
2752 'label' => __('Arrows', 'ultimate-store-kit'),
2753 'type' => Controls_Manager::HEADING,
2754 'condition' => [
2755 'navigation!' => ['dots', 'progressbar', 'none'],
2756 ],
2757 ]
2758 );
2759
2760 $this->start_controls_tabs('tabs_navigation_arrows_style');
2761
2762 $this->start_controls_tab(
2763 'tabs_nav_arrows_normal',
2764 [
2765 'label' => __('Normal', 'ultimate-store-kit'),
2766 'condition' => [
2767 'navigation!' => ['dots', 'progressbar', 'none'],
2768 ],
2769 ]
2770 );
2771
2772 $this->add_control(
2773 'arrows_color',
2774 [
2775 'label' => __('Color', 'ultimate-store-kit'),
2776 'type' => Controls_Manager::COLOR,
2777 'selectors' => [
2778 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev i, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next i' => 'color: {{VALUE}}',
2779 ],
2780 'condition' => [
2781 'navigation!' => ['dots', 'progressbar', 'none'],
2782 ],
2783 ]
2784 );
2785
2786 $this->add_control(
2787 'arrows_background',
2788 [
2789 'label' => __('Background', 'ultimate-store-kit'),
2790 'type' => Controls_Manager::COLOR,
2791 'selectors' => [
2792 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'background-color: {{VALUE}}',
2793 ],
2794 'condition' => [
2795 'navigation!' => ['dots', 'progressbar', 'none'],
2796 ],
2797 ]
2798 );
2799
2800 $this->add_group_control(
2801 Group_Control_Border::get_type(),
2802 [
2803 'name' => 'nav_arrows_border',
2804 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next',
2805 'condition' => [
2806 'navigation!' => ['dots', 'progressbar', 'none'],
2807 ],
2808 ]
2809 );
2810
2811 $this->add_responsive_control(
2812 'border_radius',
2813 [
2814 'label' => __('Border Radius', 'ultimate-store-kit'),
2815 'type' => Controls_Manager::DIMENSIONS,
2816 'size_units' => ['px', '%'],
2817 'selectors' => [
2818 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2819 ],
2820 'condition' => [
2821 'navigation!' => ['dots', 'progressbar', 'none'],
2822 ],
2823 ]
2824 );
2825
2826 $this->add_responsive_control(
2827 'arrows_padding',
2828 [
2829 'label' => esc_html__('Padding', 'ultimate-store-kit'),
2830 'type' => Controls_Manager::DIMENSIONS,
2831 'size_units' => ['px', 'em', '%'],
2832 'selectors' => [
2833 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2834 ],
2835 'condition' => [
2836 'navigation!' => ['dots', 'progressbar', 'none'],
2837 ],
2838 ]
2839 );
2840
2841 $this->add_responsive_control(
2842 'arrows_size',
2843 [
2844 'label' => __('Size', 'ultimate-store-kit'),
2845 'type' => Controls_Manager::SLIDER,
2846 'range' => [
2847 'px' => [
2848 'min' => 10,
2849 'max' => 100,
2850 ],
2851 ],
2852 'selectors' => [
2853 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev i,
2854 {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next i' => 'font-size: {{SIZE || 24}}{{UNIT}};',
2855 ],
2856 'condition' => [
2857 'navigation!' => ['dots', 'progressbar', 'none'],
2858 ],
2859 ]
2860 );
2861
2862 $this->add_responsive_control(
2863 'arrows_space',
2864 [
2865 'label' => __('Space Between Arrows', 'ultimate-store-kit'),
2866 'type' => Controls_Manager::SLIDER,
2867 'range' => [
2868 'px' => [
2869 'min' => 0,
2870 'max' => 100,
2871 ],
2872 ],
2873 'selectors' => [
2874 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'margin-right: {{SIZE}}px;',
2875 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'margin-left: {{SIZE}}px;',
2876 ],
2877 'condition' => [
2878 'navigation!' => ['dots', 'progressbar', 'none'],
2879 ],
2880 ]
2881 );
2882
2883 $this->end_controls_tab();
2884
2885 $this->start_controls_tab(
2886 'tabs_nav_arrows_hover',
2887 [
2888 'label' => __('Hover', 'ultimate-store-kit'),
2889 'condition' => [
2890 'navigation!' => ['dots', 'progressbar', 'none'],
2891 ],
2892 ]
2893 );
2894
2895 $this->add_control(
2896 'arrows_hover_color',
2897 [
2898 'label' => __('Color', 'ultimate-store-kit'),
2899 'type' => Controls_Manager::COLOR,
2900 'selectors' => [
2901 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev:hover i, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next:hover i' => 'color: {{VALUE}}',
2902 ],
2903 'condition' => [
2904 'navigation!' => ['dots', 'progressbar', 'none'],
2905 ],
2906 ]
2907 );
2908
2909 $this->add_control(
2910 'arrows_hover_background',
2911 [
2912 'label' => __('Background', 'ultimate-store-kit'),
2913 'type' => Controls_Manager::COLOR,
2914 'selectors' => [
2915 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev:hover, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next:hover' => 'background-color: {{VALUE}}',
2916 ],
2917 'condition' => [
2918 'navigation!' => ['dots', 'progressbar', 'none'],
2919 ],
2920 ]
2921 );
2922
2923 $this->add_control(
2924 'nav_arrows_hover_border_color',
2925 [
2926 'label' => __('Border Color', 'ultimate-store-kit'),
2927 'type' => Controls_Manager::COLOR,
2928 'selectors' => [
2929 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev:hover, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next:hover' => 'border-color: {{VALUE}};',
2930 ],
2931 'condition' => [
2932 'nav_arrows_border_border!' => '',
2933 'navigation!' => ['dots', 'progressbar', 'none'],
2934 ],
2935 ]
2936 );
2937
2938 $this->end_controls_tab();
2939
2940 $this->end_controls_tabs();
2941
2942 $this->add_control(
2943 'hr_1',
2944 [
2945 'type' => Controls_Manager::DIVIDER,
2946 'condition' => [
2947 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2948 ],
2949 ]
2950 );
2951
2952 $this->add_control(
2953 'dots_heading',
2954 [
2955 'label' => __('Dots', 'ultimate-store-kit'),
2956 'type' => Controls_Manager::HEADING,
2957 'condition' => [
2958 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2959 ],
2960 ]
2961 );
2962
2963 $this->add_control(
2964 'hr_11',
2965 [
2966 'type' => Controls_Manager::DIVIDER,
2967 'condition' => [
2968 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2969 ],
2970 ]
2971 );
2972
2973 $this->add_control(
2974 'dots_color',
2975 [
2976 'label' => __('Color', 'ultimate-store-kit'),
2977 'type' => Controls_Manager::COLOR,
2978 'selectors' => [
2979 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'background-color: {{VALUE}}',
2980 ],
2981 'condition' => [
2982 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2983 ],
2984 ]
2985 );
2986
2987 $this->add_control(
2988 'active_dot_color',
2989 [
2990 'label' => __('Active Color', 'ultimate-store-kit'),
2991 'type' => Controls_Manager::COLOR,
2992 'selectors' => [
2993 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}',
2994 ],
2995 'condition' => [
2996 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2997 ],
2998 ]
2999 );
3000
3001 $this->add_responsive_control(
3002 'dots_border_radius',
3003 [
3004 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
3005 'type' => Controls_Manager::DIMENSIONS,
3006 'size_units' => ['px', '%'],
3007 'selectors' => [
3008 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3009 ],
3010 'condition' => [
3011 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3012 ],
3013 ]
3014 );
3015
3016 $this->add_responsive_control(
3017 'dots_width_size',
3018 [
3019 'label' => __('Width(px)', 'ultimate-store-kit'),
3020 'type' => Controls_Manager::SLIDER,
3021 'range' => [
3022 'px' => [
3023 'min' => 5,
3024 'max' => 50,
3025 ],
3026 ],
3027 'selectors' => [
3028 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};',
3029 ],
3030 'condition' => [
3031 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3032 ],
3033 ]
3034 );
3035
3036 $this->add_responsive_control(
3037 'dots_height_size',
3038 [
3039 'label' => __('Height(px)', 'ultimate-store-kit'),
3040 'type' => Controls_Manager::SLIDER,
3041 'range' => [
3042 'px' => [
3043 'min' => 5,
3044 'max' => 50,
3045 ],
3046 ],
3047 'selectors' => [
3048 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};',
3049 ],
3050 'condition' => [
3051 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3052 ],
3053 ]
3054 );
3055
3056 $this->add_control(
3057 'hr_22',
3058 [
3059 'type' => Controls_Manager::DIVIDER,
3060 'condition' => [
3061 'navigation' => 'arrows-fraction',
3062 ],
3063 ]
3064 );
3065
3066 $this->add_control(
3067 'fraction_heading',
3068 [
3069 'label' => __('Fraction', 'ultimate-store-kit'),
3070 'type' => Controls_Manager::HEADING,
3071 'condition' => [
3072 'navigation' => 'arrows-fraction',
3073 ],
3074 ]
3075 );
3076
3077 $this->add_control(
3078 'hr_12',
3079 [
3080 'type' => Controls_Manager::DIVIDER,
3081 'condition' => [
3082 'navigation' => 'arrows-fraction',
3083 ],
3084 ]
3085 );
3086
3087 $this->add_control(
3088 'fraction_color',
3089 [
3090 'label' => __('Color', 'ultimate-store-kit'),
3091 'type' => Controls_Manager::COLOR,
3092 'selectors' => [
3093 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-fraction' => 'color: {{VALUE}}',
3094 ],
3095 'condition' => [
3096 'navigation' => 'arrows-fraction',
3097 ],
3098 ]
3099 );
3100
3101 $this->add_control(
3102 'active_fraction_color',
3103 [
3104 'label' => __('Active Color', 'ultimate-store-kit'),
3105 'type' => Controls_Manager::COLOR,
3106 'selectors' => [
3107 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-current' => 'color: {{VALUE}}',
3108 ],
3109 'condition' => [
3110 'navigation' => 'arrows-fraction',
3111 ],
3112 ]
3113 );
3114
3115 $this->add_group_control(
3116 Group_Control_Typography::get_type(),
3117 [
3118 'name' => 'fraction_typography',
3119 'label' => esc_html__('Typography', 'ultimate-store-kit'),
3120 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-fraction',
3121 'condition' => [
3122 'navigation' => 'arrows-fraction',
3123 ],
3124 ]
3125 );
3126
3127 $this->add_control(
3128 'hr_3',
3129 [
3130 'type' => Controls_Manager::DIVIDER,
3131 'condition' => [
3132 'navigation' => 'progressbar',
3133 ],
3134 ]
3135 );
3136
3137 $this->add_control(
3138 'progresbar_heading',
3139 [
3140 'label' => __('Progresbar', 'ultimate-store-kit'),
3141 'type' => Controls_Manager::HEADING,
3142 'condition' => [
3143 'navigation' => 'progressbar',
3144 ],
3145 ]
3146 );
3147
3148 $this->add_control(
3149 'hr_13',
3150 [
3151 'type' => Controls_Manager::DIVIDER,
3152 'condition' => [
3153 'navigation' => 'progressbar',
3154 ],
3155 ]
3156 );
3157
3158 $this->add_control(
3159 'progresbar_color',
3160 [
3161 'label' => __('Bar Color', 'ultimate-store-kit'),
3162 'type' => Controls_Manager::COLOR,
3163 'selectors' => [
3164 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-progressbar' => 'background-color: {{VALUE}}',
3165 ],
3166 'condition' => [
3167 'navigation' => 'progressbar',
3168 ],
3169 ]
3170 );
3171
3172 $this->add_control(
3173 'progres_color',
3174 [
3175 'label' => __('Progress Color', 'ultimate-store-kit'),
3176 'type' => Controls_Manager::COLOR,
3177 'separator' => 'after',
3178 'selectors' => [
3179 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}',
3180 ],
3181 'condition' => [
3182 'navigation' => 'progressbar',
3183 ],
3184 ]
3185 );
3186
3187 $this->add_control(
3188 'hr_4',
3189 [
3190 'type' => Controls_Manager::DIVIDER,
3191 'condition' => [
3192 'show_scrollbar' => 'yes'
3193 ],
3194 ]
3195 );
3196
3197 $this->add_control(
3198 'scrollbar_heading',
3199 [
3200 'label' => __('Scrollbar', 'ultimate-store-kit'),
3201 'type' => Controls_Manager::HEADING,
3202 'condition' => [
3203 'show_scrollbar' => 'yes'
3204 ],
3205 ]
3206 );
3207
3208 $this->add_control(
3209 'hr_14',
3210 [
3211 'type' => Controls_Manager::DIVIDER,
3212 'condition' => [
3213 'show_scrollbar' => 'yes'
3214 ],
3215 ]
3216 );
3217
3218 $this->add_control(
3219 'scrollbar_color',
3220 [
3221 'label' => __('Bar Color', 'ultimate-store-kit'),
3222 'type' => Controls_Manager::COLOR,
3223 'selectors' => [
3224 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-scrollbar' => 'background: {{VALUE}}',
3225 ],
3226 'condition' => [
3227 'show_scrollbar' => 'yes'
3228 ],
3229 ]
3230 );
3231
3232 $this->add_control(
3233 'scrollbar_drag_color',
3234 [
3235 'label' => __('Drag Color', 'ultimate-store-kit'),
3236 'type' => Controls_Manager::COLOR,
3237 'selectors' => [
3238 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}',
3239 ],
3240 'condition' => [
3241 'show_scrollbar' => 'yes'
3242 ],
3243 ]
3244 );
3245
3246 $this->add_responsive_control(
3247 'scrollbar_height',
3248 [
3249 'label' => __('Height', 'ultimate-store-kit'),
3250 'type' => Controls_Manager::SLIDER,
3251 'range' => [
3252 'px' => [
3253 'min' => 1,
3254 'max' => 10,
3255 ],
3256 ],
3257 'selectors' => [
3258 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-container-horizontal > .swiper-scrollbar, {{WRAPPER}} .' . $this->get_name() . ' .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;',
3259 ],
3260 'condition' => [
3261 'show_scrollbar' => 'yes'
3262 ],
3263 ]
3264 );
3265
3266 $this->add_control(
3267 'hr_05',
3268 [
3269 'type' => Controls_Manager::DIVIDER,
3270 ]
3271 );
3272
3273 $this->add_control(
3274 'navi_offset_heading',
3275 [
3276 'label' => __('Offset', 'ultimate-store-kit'),
3277 'type' => Controls_Manager::HEADING,
3278 ]
3279 );
3280
3281 $this->add_control(
3282 'hr_6',
3283 [
3284 'type' => Controls_Manager::DIVIDER,
3285 ]
3286 );
3287
3288 $this->add_responsive_control(
3289 'arrows_ncx_position',
3290 [
3291 'label' => __('Arrows Horizontal Offset', 'ultimate-store-kit'),
3292 'type' => Controls_Manager::SLIDER,
3293 'default' => [
3294 'size' => 0,
3295 ],
3296 'tablet_default' => [
3297 'size' => 0,
3298 ],
3299 'mobile_default' => [
3300 'size' => 0,
3301 ],
3302 'range' => [
3303 'px' => [
3304 'min' => -200,
3305 'max' => 200,
3306 ],
3307 ],
3308 'conditions' => [
3309 'terms' => [
3310 [
3311 'name' => 'navigation',
3312 'value' => 'arrows',
3313 ],
3314 [
3315 'name' => 'arrows_position',
3316 'operator' => '!=',
3317 'value' => 'center',
3318 ],
3319 ],
3320 ],
3321 'selectors' => [
3322 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-ncx: {{SIZE}}px;'
3323 ],
3324 ]
3325 );
3326
3327 $this->add_responsive_control(
3328 'arrows_ncy_position',
3329 [
3330 'label' => __('Arrows Vertical Offset', 'ultimate-store-kit'),
3331 'type' => Controls_Manager::SLIDER,
3332 'default' => [
3333 'size' => 0,
3334 ],
3335 'tablet_default' => [
3336 'size' => 0,
3337 ],
3338 'mobile_default' => [
3339 'size' => 0,
3340 ],
3341 'range' => [
3342 'px' => [
3343 'min' => -200,
3344 'max' => 200,
3345 ],
3346 ],
3347 'selectors' => [
3348 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-ncy: {{SIZE}}px;'
3349 ],
3350 'conditions' => [
3351 'terms' => [
3352 [
3353 'name' => 'navigation',
3354 'value' => 'arrows',
3355 ],
3356 // [
3357 // 'name' => 'arrows_position',
3358 // 'operator' => '!=',
3359 // 'value' => 'center',
3360 // ],
3361 ],
3362 ],
3363 ]
3364 );
3365
3366 $this->add_responsive_control(
3367 'arrows_acx_position',
3368 [
3369 'label' => __('Arrows Horizontal Offset', 'ultimate-store-kit'),
3370 'type' => Controls_Manager::SLIDER,
3371 'default' => [
3372 'size' => -60,
3373 ],
3374 'range' => [
3375 'px' => [
3376 'min' => -200,
3377 'max' => 200,
3378 ],
3379 ],
3380 'selectors' => [
3381 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'left: {{SIZE}}px;',
3382 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'right: {{SIZE}}px;',
3383 ],
3384 'conditions' => [
3385 'terms' => [
3386 [
3387 'name' => 'navigation',
3388 'value' => 'arrows',
3389 ],
3390 [
3391 'name' => 'arrows_position',
3392 'value' => 'center',
3393 ],
3394 ],
3395 ],
3396 ]
3397 );
3398
3399 $this->add_responsive_control(
3400 'dots_nnx_position',
3401 [
3402 'label' => __('Dots Horizontal Offset', 'ultimate-store-kit'),
3403 'type' => Controls_Manager::SLIDER,
3404 'default' => [
3405 'size' => 0,
3406 ],
3407 'tablet_default' => [
3408 'size' => 0,
3409 ],
3410 'mobile_default' => [
3411 'size' => 0,
3412 ],
3413 'range' => [
3414 'px' => [
3415 'min' => -200,
3416 'max' => 200,
3417 ],
3418 ],
3419 'conditions' => [
3420 'terms' => [
3421 [
3422 'name' => 'navigation',
3423 'value' => 'dots',
3424 ],
3425 [
3426 'name' => 'dots_position',
3427 'operator' => '!=',
3428 'value' => '',
3429 ],
3430 ],
3431 ],
3432 'selectors' => [
3433 '{{WRAPPER}}' => '--usk-swiper-carousel-dots-nnx: {{SIZE}}px;'
3434 ],
3435 ]
3436 );
3437
3438 $this->add_responsive_control(
3439 'dots_nny_position',
3440 [
3441 'label' => __('Dots Vertical Offset', 'ultimate-store-kit'),
3442 'type' => Controls_Manager::SLIDER,
3443 'default' => [
3444 'size' => 30,
3445 ],
3446 'tablet_default' => [
3447 'size' => 30,
3448 ],
3449 'mobile_default' => [
3450 'size' => 30,
3451 ],
3452 'range' => [
3453 'px' => [
3454 'min' => -200,
3455 'max' => 200,
3456 ],
3457 ],
3458 'conditions' => [
3459 'terms' => [
3460 [
3461 'name' => 'navigation',
3462 'value' => 'dots',
3463 ],
3464 [
3465 'name' => 'dots_position',
3466 'operator' => '!=',
3467 'value' => '',
3468 ],
3469 ],
3470 ],
3471 'selectors' => [
3472 '{{WRAPPER}}' => '--usk-swiper-carousel-dots-nny: {{SIZE}}px;'
3473 ],
3474 ]
3475 );
3476
3477 $this->add_responsive_control(
3478 'both_ncx_position',
3479 [
3480 'label' => __('Arrows & Dots Horizontal Offset', 'ultimate-store-kit'),
3481 'type' => Controls_Manager::SLIDER,
3482 'default' => [
3483 'size' => 0,
3484 ],
3485 'tablet_default' => [
3486 'size' => 0,
3487 ],
3488 'mobile_default' => [
3489 'size' => 0,
3490 ],
3491 'range' => [
3492 'px' => [
3493 'min' => -200,
3494 'max' => 200,
3495 ],
3496 ],
3497 'conditions' => [
3498 'terms' => [
3499 [
3500 'name' => 'navigation',
3501 'value' => 'both',
3502 ],
3503 [
3504 'name' => 'both_position',
3505 'operator' => '!=',
3506 'value' => 'center',
3507 ],
3508 ],
3509 ],
3510 'selectors' => [
3511 '{{WRAPPER}}' => '--usk-swiper-carousel-both-ncx: {{SIZE}}px;'
3512 ],
3513 ]
3514 );
3515
3516 $this->add_responsive_control(
3517 'both_ncy_position',
3518 [
3519 'label' => __('Arrows & Dots Vertical Offset', 'ultimate-store-kit'),
3520 'type' => Controls_Manager::SLIDER,
3521 'default' => [
3522 'size' => 0,
3523 ],
3524 'tablet_default' => [
3525 'size' => 0,
3526 ],
3527 'mobile_default' => [
3528 'size' => 0,
3529 ],
3530 'range' => [
3531 'px' => [
3532 'min' => -200,
3533 'max' => 200,
3534 ],
3535 ],
3536 'conditions' => [
3537 'terms' => [
3538 [
3539 'name' => 'navigation',
3540 'value' => 'both',
3541 ],
3542 [
3543 'name' => 'both_position',
3544 'operator' => '!=',
3545 'value' => 'center',
3546 ],
3547 ],
3548 ],
3549 'selectors' => [
3550 '{{WRAPPER}}' => '--usk-swiper-carousel-both-ncy: {{SIZE}}px;'
3551 ],
3552 ]
3553 );
3554
3555 $this->add_responsive_control(
3556 'both_cx_position',
3557 [
3558 'label' => __('Arrows Offset', 'ultimate-store-kit'),
3559 'type' => Controls_Manager::SLIDER,
3560 'default' => [
3561 'size' => -60,
3562 ],
3563 'range' => [
3564 'px' => [
3565 'min' => -200,
3566 'max' => 200,
3567 ],
3568 ],
3569 'selectors' => [
3570 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'left: {{SIZE}}px;',
3571 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'right: {{SIZE}}px;',
3572 ],
3573 'conditions' => [
3574 'terms' => [
3575 [
3576 'name' => 'navigation',
3577 'value' => 'both',
3578 ],
3579 [
3580 'name' => 'both_position',
3581 'value' => 'center',
3582 ],
3583 ],
3584 ],
3585 ]
3586 );
3587
3588 $this->add_responsive_control(
3589 'both_cy_position',
3590 [
3591 'label' => __('Dots Offset', 'ultimate-store-kit'),
3592 'type' => Controls_Manager::SLIDER,
3593 'default' => [
3594 'size' => 30,
3595 ],
3596 'range' => [
3597 'px' => [
3598 'min' => -200,
3599 'max' => 200,
3600 ],
3601 ],
3602 'selectors' => [
3603 '{{WRAPPER}} .' . $this->get_name() . ' .usk-dots-container' => 'transform: translateY({{SIZE}}px);',
3604 ],
3605 'conditions' => [
3606 'terms' => [
3607 [
3608 'name' => 'navigation',
3609 'value' => 'both',
3610 ],
3611 [
3612 'name' => 'both_position',
3613 'value' => 'center',
3614 ],
3615 ],
3616 ],
3617 ]
3618 );
3619
3620 $this->add_responsive_control(
3621 'arrows_fraction_ncx_position',
3622 [
3623 'label' => __('Arrows & Fraction Horizontal Offset', 'ultimate-store-kit'),
3624 'type' => Controls_Manager::SLIDER,
3625 'default' => [
3626 'size' => 0,
3627 ],
3628 'tablet_default' => [
3629 'size' => 0,
3630 ],
3631 'mobile_default' => [
3632 'size' => 0,
3633 ],
3634 'range' => [
3635 'px' => [
3636 'min' => -200,
3637 'max' => 200,
3638 ],
3639 ],
3640 'conditions' => [
3641 'terms' => [
3642 [
3643 'name' => 'navigation',
3644 'value' => 'arrows-fraction',
3645 ],
3646 [
3647 'name' => 'arrows_fraction_position',
3648 'operator' => '!=',
3649 'value' => 'center',
3650 ],
3651 ],
3652 ],
3653 'selectors' => [
3654 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-fraction-ncx: {{SIZE}}px;'
3655 ],
3656 ]
3657 );
3658
3659 $this->add_responsive_control(
3660 'arrows_fraction_ncy_position',
3661 [
3662 'label' => __('Arrows & Fraction Vertical Offset', 'ultimate-store-kit'),
3663 'type' => Controls_Manager::SLIDER,
3664 'default' => [
3665 'size' => 0,
3666 ],
3667 'tablet_default' => [
3668 'size' => 0,
3669 ],
3670 'mobile_default' => [
3671 'size' => 0,
3672 ],
3673 'range' => [
3674 'px' => [
3675 'min' => -200,
3676 'max' => 200,
3677 ],
3678 ],
3679 'conditions' => [
3680 'terms' => [
3681 [
3682 'name' => 'navigation',
3683 'value' => 'arrows-fraction',
3684 ],
3685 [
3686 'name' => 'arrows_fraction_position',
3687 'operator' => '!=',
3688 'value' => 'center',
3689 ],
3690 ],
3691 ],
3692 'selectors' => [
3693 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-fraction-ncy: {{SIZE}}px;'
3694 ],
3695 ]
3696 );
3697
3698 $this->add_responsive_control(
3699 'arrows_fraction_cx_position',
3700 [
3701 'label' => __('Arrows Offset', 'ultimate-store-kit'),
3702 'type' => Controls_Manager::SLIDER,
3703 'default' => [
3704 'size' => -60,
3705 ],
3706 'range' => [
3707 'px' => [
3708 'min' => -200,
3709 'max' => 200,
3710 ],
3711 ],
3712 'selectors' => [
3713 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'left: {{SIZE}}px;',
3714 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'right: {{SIZE}}px;',
3715 ],
3716 'conditions' => [
3717 'terms' => [
3718 [
3719 'name' => 'navigation',
3720 'value' => 'arrows-fraction',
3721 ],
3722 [
3723 'name' => 'arrows_fraction_position',
3724 'value' => 'center',
3725 ],
3726 ],
3727 ],
3728 ]
3729 );
3730
3731 $this->add_responsive_control(
3732 'arrows_fraction_cy_position',
3733 [
3734 'label' => __('Fraction Offset', 'ultimate-store-kit'),
3735 'type' => Controls_Manager::SLIDER,
3736 'default' => [
3737 'size' => 30,
3738 ],
3739 'range' => [
3740 'px' => [
3741 'min' => -200,
3742 'max' => 200,
3743 ],
3744 ],
3745 'selectors' => [
3746 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);',
3747 ],
3748 'conditions' => [
3749 'terms' => [
3750 [
3751 'name' => 'navigation',
3752 'value' => 'arrows-fraction',
3753 ],
3754 [
3755 'name' => 'arrows_fraction_position',
3756 'value' => 'center',
3757 ],
3758 ],
3759 ],
3760 ]
3761 );
3762
3763 $this->add_responsive_control(
3764 'progress_y_position',
3765 [
3766 'label' => __('Progress Offset', 'ultimate-store-kit'),
3767 'type' => Controls_Manager::SLIDER,
3768 'default' => [
3769 'size' => 15,
3770 ],
3771 'range' => [
3772 'px' => [
3773 'min' => -200,
3774 'max' => 200,
3775 ],
3776 ],
3777 'selectors' => [
3778 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);',
3779 ],
3780 'condition' => [
3781 'navigation' => 'progressbar',
3782 ],
3783 ]
3784 );
3785
3786 $this->add_responsive_control(
3787 'scrollbar_vertical_offset',
3788 [
3789 'label' => __('Scrollbar Offset', 'ultimate-store-kit'),
3790 'type' => Controls_Manager::SLIDER,
3791 'selectors' => [
3792 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-container-horizontal > .swiper-scrollbar, {{WRAPPER}} .' . $this->get_name() . ' .swiper-horizontal > .swiper-scrollbar' => 'bottom: {{SIZE}}px;',
3793 ],
3794 'condition' => [
3795 'show_scrollbar' => 'yes'
3796 ],
3797 ]
3798 );
3799
3800 $this->end_controls_section();
3801 }
3802 protected function register_global_controls_carousel_settings() {
3803 $this->start_controls_section(
3804 'section_carousel_settings',
3805 [
3806 'label' => __('Carousel Settings', 'ultimate-store-kit'),
3807 ]
3808 );
3809
3810 $this->add_control(
3811 'skin',
3812 [
3813 'label' => esc_html__('Layout', 'ultimate-store-kit'),
3814 'type' => Controls_Manager::SELECT,
3815 'default' => 'carousel',
3816 'options' => [
3817 'carousel' => esc_html__('Carousel', 'ultimate-store-kit'),
3818 'coverflow' => esc_html__('Coverflow', 'ultimate-store-kit'),
3819 ],
3820 'prefix_class' => 'usk-carousel-style-',
3821 'render_type' => 'template',
3822 ]
3823 );
3824
3825 $this->add_control(
3826 'coverflow_toggle',
3827 [
3828 'label' => __('Coverflow Effect', 'ultimate-store-kit'),
3829 'type' => Controls_Manager::POPOVER_TOGGLE,
3830 'return_value' => 'yes',
3831 'condition' => [
3832 'skin' => 'coverflow'
3833 ]
3834 ]
3835 );
3836
3837 $this->start_popover();
3838
3839 $this->add_control(
3840 'coverflow_rotate',
3841 [
3842 'label' => esc_html__('Rotate', 'ultimate-store-kit'),
3843 'type' => Controls_Manager::SLIDER,
3844 'default' => [
3845 'size' => 50,
3846 ],
3847 'range' => [
3848 'px' => [
3849 'min' => -360,
3850 'max' => 360,
3851 'step' => 5,
3852 ],
3853 ],
3854 'condition' => [
3855 'coverflow_toggle' => 'yes'
3856 ],
3857 'render_type' => 'template',
3858 ]
3859 );
3860
3861 $this->add_control(
3862 'coverflow_stretch',
3863 [
3864 'label' => __('Stretch', 'ultimate-store-kit'),
3865 'type' => Controls_Manager::SLIDER,
3866 'default' => [
3867 'size' => 0,
3868 ],
3869 'range' => [
3870 'px' => [
3871 'min' => 0,
3872 'step' => 10,
3873 'max' => 100,
3874 ],
3875 ],
3876 'condition' => [
3877 'coverflow_toggle' => 'yes'
3878 ],
3879 'render_type' => 'template',
3880 ]
3881 );
3882
3883 $this->add_control(
3884 'coverflow_modifier',
3885 [
3886 'label' => __('Modifier', 'ultimate-store-kit'),
3887 'type' => Controls_Manager::SLIDER,
3888 'default' => [
3889 'size' => 1,
3890 ],
3891 'range' => [
3892 'px' => [
3893 'min' => 1,
3894 'step' => 1,
3895 'max' => 10,
3896 ],
3897 ],
3898 'condition' => [
3899 'coverflow_toggle' => 'yes'
3900 ],
3901 'render_type' => 'template',
3902 ]
3903 );
3904
3905 $this->add_control(
3906 'coverflow_depth',
3907 [
3908 'label' => __('Depth', 'ultimate-store-kit'),
3909 'type' => Controls_Manager::SLIDER,
3910 'default' => [
3911 'size' => 100,
3912 ],
3913 'range' => [
3914 'px' => [
3915 'min' => 0,
3916 'step' => 10,
3917 'max' => 1000,
3918 ],
3919 ],
3920 'condition' => [
3921 'coverflow_toggle' => 'yes'
3922 ],
3923 'render_type' => 'template',
3924 ]
3925 );
3926
3927 $this->end_popover();
3928
3929 $this->add_control(
3930 'hr_005',
3931 [
3932 'type' => Controls_Manager::DIVIDER,
3933 'condition' => [
3934 'skin' => 'coverflow'
3935 ]
3936 ]
3937 );
3938
3939 $this->add_control(
3940 'autoplay',
3941 [
3942 'label' => __('Autoplay', 'ultimate-store-kit'),
3943 'type' => Controls_Manager::SWITCHER,
3944 'default' => 'yes',
3945
3946 ]
3947 );
3948
3949 $this->add_control(
3950 'autoplay_speed',
3951 [
3952 'label' => esc_html__('Autoplay Speed', 'ultimate-store-kit'),
3953 'type' => Controls_Manager::NUMBER,
3954 'default' => 5000,
3955 'condition' => [
3956 'autoplay' => 'yes',
3957 ],
3958 ]
3959 );
3960
3961 $this->add_control(
3962 'pauseonhover',
3963 [
3964 'label' => esc_html__('Pause on Hover', 'ultimate-store-kit'),
3965 'type' => Controls_Manager::SWITCHER,
3966 ]
3967 );
3968
3969 $this->add_responsive_control(
3970 'slides_to_scroll',
3971 [
3972 'type' => Controls_Manager::SELECT,
3973 'label' => esc_html__('Slides to Scroll', 'ultimate-store-kit'),
3974 'default' => 1,
3975 'tablet_default' => 1,
3976 'mobile_default' => 1,
3977 'options' => [
3978 1 => '1',
3979 2 => '2',
3980 3 => '3',
3981 4 => '4',
3982 5 => '5',
3983 6 => '6',
3984 ],
3985 ]
3986 );
3987
3988 $this->add_control(
3989 'centered_slides',
3990 [
3991 'label' => __('Center Slide', 'ultimate-store-kit'),
3992 'description' => __('Use even items from Layout > Columns settings for better preview.', 'ultimate-store-kit'),
3993 'type' => Controls_Manager::SWITCHER,
3994 ]
3995 );
3996
3997 $this->add_control(
3998 'grab_cursor',
3999 [
4000 'label' => __('Grab Cursor', 'ultimate-store-kit'),
4001 'type' => Controls_Manager::SWITCHER,
4002 ]
4003 );
4004
4005 $this->add_control(
4006 'loop',
4007 [
4008 'label' => __('Loop', 'ultimate-store-kit'),
4009 'type' => Controls_Manager::SWITCHER,
4010 'default' => 'yes',
4011
4012 ]
4013 );
4014
4015
4016 $this->add_control(
4017 'speed',
4018 [
4019 'label' => __('Animation Speed (ms)', 'ultimate-store-kit'),
4020 'type' => Controls_Manager::SLIDER,
4021 'default' => [
4022 'size' => 500,
4023 ],
4024 'range' => [
4025 'px' => [
4026 'min' => 100,
4027 'max' => 5000,
4028 'step' => 50,
4029 ],
4030 ],
4031 ]
4032 );
4033
4034 $this->add_control(
4035 'observer',
4036 [
4037 'label' => __('Observer', 'ultimate-store-kit'),
4038 'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-store-kit'),
4039 'type' => Controls_Manager::SWITCHER,
4040 ]
4041 );
4042
4043 $this->add_responsive_control(
4044 'item_shadow_padding',
4045 [
4046 'label' => __('Match Padding', 'ultimate-store-kit'),
4047 'description' => __('You have to add padding for matching overlaping normal/hover box shadow when you used Box Shadow option.', 'ultimate-store-kit'),
4048 'type' => Controls_Manager::SLIDER,
4049 'range' => [
4050 'px' => [
4051 'min' => 0,
4052 'step' => 1,
4053 'max' => 50,
4054 ]
4055 ],
4056 'default' => [
4057 'size' => 10
4058 ],
4059 'selectors' => [
4060 '{{WRAPPER}} .swiper-carousel' => 'padding: {{SIZE}}{{UNIT}}; margin: 0 -{{SIZE}}{{UNIT}};'
4061 ],
4062 ]
4063 );
4064
4065 $this->end_controls_section();
4066 }
4067 }
4068