PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 2.0.5
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v2.0.5
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.5, at traits/global-widget-controls.php

4,095 lines 148.0 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 /**
2240 * Register global controls for badge
2241 */
2242 protected function register_global_controls_badge() {
2243 $this->start_controls_section(
2244 'badge',
2245 [
2246 'label' => esc_html__('Badge', 'ultimate-store-kit'),
2247 'tab' => Controls_Manager::TAB_STYLE,
2248 'conditions' => [
2249 'relation' => 'or',
2250 'terms' => [
2251 [
2252 'name' => 'show_sale_badge',
2253 'value' => 'yes'
2254 ],
2255 [
2256 'name' => 'show_discount_badge',
2257 'value' => 'yes'
2258 ],
2259 [
2260 'name' => 'show_stock_status',
2261 'value' => 'yes'
2262 ],
2263 [
2264 'name' => 'show_trending_badge',
2265 'value' => 'yes'
2266 ],
2267 [
2268 'name' => 'show_new_badge',
2269 'value' => 'yes'
2270 ]
2271 ]
2272 ]
2273 ]
2274 );
2275 $this->add_group_control(
2276 Group_Control_Border::get_type(),
2277 [
2278 'name' => 'badge_border',
2279 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge',
2280 ]
2281 );
2282 $this->add_responsive_control(
2283 'badge_radius',
2284 [
2285 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
2286 'type' => Controls_Manager::DIMENSIONS,
2287 'size_units' => ['px', '%', 'em'],
2288 'selectors' => [
2289 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2290 ],
2291 ]
2292 );
2293 $this->add_responsive_control(
2294 'badge_padding',
2295 [
2296 'label' => esc_html__('Padding', 'ultimate-store-kit'),
2297 'type' => Controls_Manager::DIMENSIONS,
2298 'size_units' => ['px', '%', 'em'],
2299 'selectors' => [
2300 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2301 ],
2302 ]
2303 );
2304 $this->add_responsive_control(
2305 'badge_margin',
2306 [
2307 'label' => esc_html__('Margin', 'ultimate-store-kit'),
2308 'type' => Controls_Manager::DIMENSIONS,
2309 'size_units' => ['px', '%', 'em'],
2310 'selectors' => [
2311 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2312 ],
2313 ]
2314 );
2315
2316 $this->add_responsive_control(
2317 'badge_spacing',
2318 [
2319 'label' => esc_html__('Space Between', 'ultimate-store-kit'),
2320 'type' => Controls_Manager::SLIDER,
2321 'default' => [
2322 'unit' => 'px',
2323 'size' => 10,
2324 ],
2325 'selectors' => [
2326 '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content' => 'gap: {{SIZE}}{{UNIT}};',
2327 ],
2328 ]
2329 );
2330 $this->add_group_control(
2331 Group_Control_Typography::get_type(),
2332 [
2333 'name' => 'badge_typography',
2334 'label' => esc_html__('Typography', 'ultimate-store-kit'),
2335 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-badge-label-content > div .usk-badge',
2336 ]
2337 );
2338 $this->start_controls_tabs(
2339 'label_badge_tabs'
2340 );
2341 $this->start_controls_tab(
2342 'sale_badge_tab',
2343 [
2344 'label' => esc_html__('Sale', 'ultimate-store-kit'),
2345 'condition' => [
2346 'show_sale_badge' => 'yes',
2347 ]
2348 ]
2349 );
2350 $this->add_control(
2351 'sale_badge_color',
2352 [
2353 'label' => esc_html__('Color', 'ultimate-store-kit'),
2354 'type' => Controls_Manager::COLOR,
2355 'selectors' => [
2356 '{{WRAPPER}} .' . $this->get_name() . ' .usk-sale-badge .usk-badge' => 'color: {{VALUE}}',
2357 ],
2358 'condition' => [
2359 'show_sale_badge' => 'yes',
2360 ]
2361 ]
2362 );
2363
2364 $this->add_group_control(
2365 Group_Control_Background::get_type(),
2366 [
2367 'name' => 'sale_badge_bg',
2368 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-sale-badge .usk-badge',
2369 'condition' => [
2370 'show_sale_badge' => 'yes',
2371 ]
2372 ]
2373 );
2374
2375 $this->add_control(
2376 'sale_badge_border_color',
2377 [
2378 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2379 'type' => Controls_Manager::COLOR,
2380 'selectors' => [
2381 '{{WRAPPER}} .' . $this->get_name() . ' .usk-sale-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2382 ],
2383 'condition' => [
2384 'show_sale_badge' => 'yes',
2385 'badge_border_border!' => '',
2386 ]
2387 ]
2388 );
2389 $this->end_controls_tab();
2390 $this->start_controls_tab(
2391 'discount_badge_tab',
2392 [
2393 'label' => esc_html__('Discount', 'ultimate-store-kit'),
2394 'condition' => [
2395 'show_discount_badge' => 'yes',
2396 ],
2397 ]
2398 );
2399 $this->add_control(
2400 'discount_badge_color',
2401 [
2402 'label' => esc_html__('Color', 'ultimate-store-kit'),
2403 'type' => Controls_Manager::COLOR,
2404 'selectors' => [
2405 '{{WRAPPER}} .' . $this->get_name() . ' .usk-percantage-badge .usk-badge' => 'color: {{VALUE}}',
2406 ],
2407 'condition' => [
2408 'show_discount_badge' => 'yes',
2409 ],
2410 ]
2411 );
2412
2413 $this->add_group_control(
2414 Group_Control_Background::get_type(),
2415 [
2416 'name' => 'discount_badge_bg',
2417 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-percantage-badge .usk-badge',
2418 'condition' => [
2419 'show_discount_badge' => 'yes',
2420 ],
2421 ]
2422 );
2423
2424 $this->add_control(
2425 'discount_badge_border_color',
2426 [
2427 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2428 'type' => Controls_Manager::COLOR,
2429 'selectors' => [
2430 '{{WRAPPER}} .' . $this->get_name() . ' .usk-percantage-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2431 ],
2432 'condition' => [
2433 'show_discount_badge' => 'yes',
2434 'badge_border_border!' => '',
2435 ],
2436 ]
2437 );
2438 $this->end_controls_tab();
2439 $this->start_controls_tab(
2440 'stock_badge_tab',
2441 [
2442 'label' => esc_html__('Stock', 'ultimate-store-kit'),
2443 'condition' => [
2444 'show_stock_status' => 'yes',
2445 ],
2446 ]
2447 );
2448 $this->add_control(
2449 'stock_badge_color',
2450 [
2451 'label' => esc_html__('Color', 'ultimate-store-kit'),
2452 'type' => Controls_Manager::COLOR,
2453 'selectors' => [
2454 '{{WRAPPER}} .' . $this->get_name() . ' .usk-stock-status-badge .usk-badge' => 'color: {{VALUE}}',
2455 ],
2456 'condition' => [
2457 'show_stock_status' => 'yes',
2458 ],
2459 ]
2460 );
2461 $this->add_group_control(
2462 Group_Control_Background::get_type(),
2463 [
2464 'name' => 'stock_badge_bg',
2465 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-stock-status-badge .usk-badge',
2466 'condition' => [
2467 'show_stock_status' => 'yes',
2468 ],
2469 ]
2470 );
2471
2472 $this->add_control(
2473 'stock_badge_border_color',
2474 [
2475 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2476 'type' => Controls_Manager::COLOR,
2477 'selectors' => [
2478 '{{WRAPPER}} .' . $this->get_name() . ' .usk-stock-status-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2479 ],
2480 'condition' => [
2481 'show_stock_status' => 'yes',
2482 'badge_border_border!' => '',
2483 ],
2484 ]
2485 );
2486 $this->end_controls_tab();
2487 $this->start_controls_tab(
2488 'trending_badge_tab',
2489 [
2490 'label' => esc_html__('Trending', 'ultimate-store-kit'),
2491 'condition' => [
2492 'show_trending_badge' => 'yes',
2493 ],
2494 ]
2495 );
2496 $this->add_control(
2497 'trending_badge_color',
2498 [
2499 'label' => esc_html__('Color', 'ultimate-store-kit'),
2500 'type' => Controls_Manager::COLOR,
2501 'selectors' => [
2502 '{{WRAPPER}} .' . $this->get_name() . ' .usk-trending-badge .usk-badge' => 'color: {{VALUE}}',
2503 ],
2504 'condition' => [
2505 'show_trending_badge' => 'yes',
2506 ],
2507 ]
2508 );
2509 $this->add_group_control(
2510 Group_Control_Background::get_type(),
2511 [
2512 'name' => 'trending_badge_bg',
2513 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-trending-badge .usk-badge',
2514 'condition' => [
2515 'show_trending_badge' => 'yes',
2516 ],
2517 ]
2518 );
2519
2520 $this->add_control(
2521 'trending_badge_border_color',
2522 [
2523 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2524 'type' => Controls_Manager::COLOR,
2525 'selectors' => [
2526 '{{WRAPPER}} .' . $this->get_name() . ' .usk-trending-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2527 ],
2528 'condition' => [
2529 'show_trending_badge' => 'yes',
2530 'badge_border_border!' => '',
2531 ],
2532 ]
2533 );
2534 $this->end_controls_tab();
2535 $this->start_controls_tab(
2536 'new_badge_tab',
2537 [
2538 'label' => esc_html__('New', 'ultimate-store-kit'),
2539 'condition' => [
2540 'show_new_badge' => 'yes',
2541 ],
2542 ]
2543 );
2544 $this->add_control(
2545 'new_badge_color',
2546 [
2547 'label' => esc_html__('Color', 'ultimate-store-kit'),
2548 'type' => Controls_Manager::COLOR,
2549 'selectors' => [
2550 '{{WRAPPER}} .' . $this->get_name() . ' .usk-new-badge .usk-badge' => 'color: {{VALUE}}',
2551 ],
2552 'condition' => [
2553 'show_new_badge' => 'yes',
2554 ],
2555 ]
2556 );
2557
2558 $this->add_group_control(
2559 Group_Control_Background::get_type(),
2560 [
2561 'name' => 'new_badge_bg',
2562 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-new-badge .usk-badge',
2563 'condition' => [
2564 'show_new_badge' => 'yes',
2565 ],
2566 ]
2567 );
2568
2569 $this->add_control(
2570 'new_badge_border_color',
2571 [
2572 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
2573 'type' => Controls_Manager::COLOR,
2574 'selectors' => [
2575 '{{WRAPPER}} .' . $this->get_name() . ' .usk-new-badge .usk-badge' => 'border-color: {{VALUE}} !important;',
2576 ],
2577 'condition' => [
2578 'show_new_badge' => 'yes',
2579 'badge_border_border!' => '',
2580 ],
2581 ]
2582 );
2583 $this->end_controls_tab();
2584 $this->end_controls_tabs();
2585 $this->end_controls_section();
2586 }
2587 protected function register_global_controls_carousel_navigation() {
2588 $this->start_controls_section(
2589 'section_content_navigation',
2590 [
2591 'label' => __('Navigation', 'ultimate-store-kit'),
2592 ]
2593 );
2594
2595 $this->add_control(
2596 'navigation',
2597 [
2598 'label' => __('Navigation', 'ultimate-store-kit'),
2599 'type' => Controls_Manager::SELECT,
2600 'default' => 'arrows',
2601 'options' => [
2602 'both' => esc_html__('Arrows and Dots', 'ultimate-store-kit'),
2603 'arrows-fraction' => esc_html__('Arrows and Fraction', 'ultimate-store-kit'),
2604 'arrows' => esc_html__('Arrows', 'ultimate-store-kit'),
2605 'dots' => esc_html__('Dots', 'ultimate-store-kit'),
2606 'progressbar' => esc_html__('Progress', 'ultimate-store-kit'),
2607 'none' => esc_html__('None', 'ultimate-store-kit'),
2608 ],
2609 'prefix_class' => 'usk-navigation-type-',
2610 'render_type' => 'template',
2611 ]
2612 );
2613
2614 $this->add_control(
2615 'both_position',
2616 [
2617 'label' => __('Arrows and Dots Position', 'ultimate-store-kit'),
2618 'type' => Controls_Manager::SELECT,
2619 'default' => 'center',
2620 'options' => ultimate_store_kit_navigation_position(),
2621 'condition' => [
2622 'navigation' => 'both',
2623 ],
2624 ]
2625 );
2626
2627 $this->add_control(
2628 'arrows_fraction_position',
2629 [
2630 'label' => __('Arrows and Fraction Position', 'ultimate-store-kit'),
2631 'type' => Controls_Manager::SELECT,
2632 'default' => 'center',
2633 'options' => ultimate_store_kit_navigation_position(),
2634 'condition' => [
2635 'navigation' => 'arrows-fraction',
2636 ],
2637 ]
2638 );
2639
2640 $this->add_control(
2641 'arrows_position',
2642 [
2643 'label' => __('Arrows Position', 'ultimate-store-kit'),
2644 'type' => Controls_Manager::SELECT,
2645 'default' => 'center',
2646 'options' => ultimate_store_kit_navigation_position(),
2647 'condition' => [
2648 'navigation' => 'arrows',
2649 ],
2650 ]
2651 );
2652
2653 $this->add_control(
2654 'dots_position',
2655 [
2656 'label' => __('Dots Position', 'ultimate-store-kit'),
2657 'type' => Controls_Manager::SELECT,
2658 'default' => 'bottom-center',
2659 'options' => ultimate_store_kit_pagination_position(),
2660 'condition' => [
2661 'navigation' => 'dots',
2662 ],
2663
2664 ]
2665 );
2666
2667 $this->add_control(
2668 'progress_position',
2669 [
2670 'label' => __('Progress Position', 'ultimate-store-kit'),
2671 'type' => Controls_Manager::SELECT,
2672 'default' => 'bottom',
2673 'options' => [
2674 'bottom' => esc_html__('Bottom', 'ultimate-store-kit'),
2675 'top' => esc_html__('Top', 'ultimate-store-kit'),
2676 ],
2677 'condition' => [
2678 'navigation' => 'progressbar',
2679 ],
2680 ]
2681 );
2682
2683 $this->add_control(
2684 'dynamic_bullets',
2685 [
2686 'label' => __('Dynamic Bullets?', 'ultimate-store-kit'),
2687 'type' => Controls_Manager::SWITCHER,
2688 'condition' => [
2689 'navigation' => ['dots', 'both'],
2690 ],
2691 ]
2692 );
2693
2694 $this->add_control(
2695 'show_scrollbar',
2696 [
2697 'label' => __('Show Scrollbar?', 'ultimate-store-kit'),
2698 'type' => Controls_Manager::SWITCHER,
2699 ]
2700 );
2701
2702 $this->add_control(
2703 'nav_arrows_icon',
2704 [
2705 'label' => esc_html__('Arrows Icon', 'ultimate-store-kit'),
2706 'type' => Controls_Manager::SELECT,
2707 'default' => '5',
2708 'options' => [
2709 '1' => esc_html__('Style 1', 'ultimate-store-kit'),
2710 '2' => esc_html__('Style 2', 'ultimate-store-kit'),
2711 '3' => esc_html__('Style 3', 'ultimate-store-kit'),
2712 '4' => esc_html__('Style 4', 'ultimate-store-kit'),
2713 '5' => esc_html__('Style 5', 'ultimate-store-kit'),
2714 '6' => esc_html__('Style 6', 'ultimate-store-kit'),
2715 '7' => esc_html__('Style 7', 'ultimate-store-kit'),
2716 '8' => esc_html__('Style 8', 'ultimate-store-kit'),
2717 '9' => esc_html__('Style 9', 'ultimate-store-kit'),
2718 '10' => esc_html__('Style 10', 'ultimate-store-kit'),
2719 '11' => esc_html__('Style 11', 'ultimate-store-kit'),
2720 '12' => esc_html__('Style 12', 'ultimate-store-kit'),
2721 '13' => esc_html__('Style 13', 'ultimate-store-kit'),
2722 '14' => esc_html__('Style 14', 'ultimate-store-kit'),
2723 '15' => esc_html__('Style 15', 'ultimate-store-kit'),
2724 '16' => esc_html__('Style 16', 'ultimate-store-kit'),
2725 '17' => esc_html__('Style 17', 'ultimate-store-kit'),
2726 '18' => esc_html__('Style 18', 'ultimate-store-kit'),
2727 'circle-1' => esc_html__('Style 19', 'ultimate-store-kit'),
2728 'circle-2' => esc_html__('Style 20', 'ultimate-store-kit'),
2729 'circle-3' => esc_html__('Style 21', 'ultimate-store-kit'),
2730 'circle-4' => esc_html__('Style 22', 'ultimate-store-kit'),
2731 'square-1' => esc_html__('Style 23', 'ultimate-store-kit'),
2732 ],
2733 'condition' => [
2734 'navigation' => ['arrows-fraction', 'both', 'arrows'],
2735 ],
2736 ]
2737 );
2738
2739 $this->add_control(
2740 'hide_arrow_on_mobile',
2741 [
2742 'label' => __('Hide Arrows on Mobile', 'ultimate-store-kit'),
2743 'type' => Controls_Manager::SWITCHER,
2744 'default' => 'yes',
2745 'condition' => [
2746 'navigation' => ['arrows-fraction', 'arrows', 'both'],
2747 ],
2748 ]
2749 );
2750
2751 $this->end_controls_section();
2752 }
2753 protected function register_global_controls_navigation_style() {
2754 $this->start_controls_section(
2755 'section_style_navigation',
2756 [
2757 'label' => __('Navigation', 'ultimate-store-kit'),
2758 'tab' => Controls_Manager::TAB_STYLE,
2759 'conditions' => [
2760 'relation' => 'or',
2761 'terms' => [
2762 [
2763 'name' => 'navigation',
2764 'operator' => '!=',
2765 'value' => 'none',
2766 ],
2767 [
2768 'name' => 'show_scrollbar',
2769 'value' => 'yes',
2770 ],
2771 ],
2772 ],
2773 ]
2774 );
2775
2776 $this->add_control(
2777 'arrows_heading',
2778 [
2779 'label' => __('Arrows', 'ultimate-store-kit'),
2780 'type' => Controls_Manager::HEADING,
2781 'condition' => [
2782 'navigation!' => ['dots', 'progressbar', 'none'],
2783 ],
2784 ]
2785 );
2786
2787 $this->start_controls_tabs('tabs_navigation_arrows_style');
2788
2789 $this->start_controls_tab(
2790 'tabs_nav_arrows_normal',
2791 [
2792 'label' => __('Normal', 'ultimate-store-kit'),
2793 'condition' => [
2794 'navigation!' => ['dots', 'progressbar', 'none'],
2795 ],
2796 ]
2797 );
2798
2799 $this->add_control(
2800 'arrows_color',
2801 [
2802 'label' => __('Color', 'ultimate-store-kit'),
2803 'type' => Controls_Manager::COLOR,
2804 'selectors' => [
2805 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev i, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next i' => 'color: {{VALUE}}',
2806 ],
2807 'condition' => [
2808 'navigation!' => ['dots', 'progressbar', 'none'],
2809 ],
2810 ]
2811 );
2812
2813 $this->add_control(
2814 'arrows_background',
2815 [
2816 'label' => __('Background', 'ultimate-store-kit'),
2817 'type' => Controls_Manager::COLOR,
2818 'selectors' => [
2819 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'background-color: {{VALUE}}',
2820 ],
2821 'condition' => [
2822 'navigation!' => ['dots', 'progressbar', 'none'],
2823 ],
2824 ]
2825 );
2826
2827 $this->add_group_control(
2828 Group_Control_Border::get_type(),
2829 [
2830 'name' => 'nav_arrows_border',
2831 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next',
2832 'condition' => [
2833 'navigation!' => ['dots', 'progressbar', 'none'],
2834 ],
2835 ]
2836 );
2837
2838 $this->add_responsive_control(
2839 'border_radius',
2840 [
2841 'label' => __('Border Radius', 'ultimate-store-kit'),
2842 'type' => Controls_Manager::DIMENSIONS,
2843 'size_units' => ['px', '%'],
2844 'selectors' => [
2845 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2846 ],
2847 'condition' => [
2848 'navigation!' => ['dots', 'progressbar', 'none'],
2849 ],
2850 ]
2851 );
2852
2853 $this->add_responsive_control(
2854 'arrows_padding',
2855 [
2856 'label' => esc_html__('Padding', 'ultimate-store-kit'),
2857 'type' => Controls_Manager::DIMENSIONS,
2858 'size_units' => ['px', 'em', '%'],
2859 'selectors' => [
2860 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
2861 ],
2862 'condition' => [
2863 'navigation!' => ['dots', 'progressbar', 'none'],
2864 ],
2865 ]
2866 );
2867
2868 $this->add_responsive_control(
2869 'arrows_size',
2870 [
2871 'label' => __('Size', 'ultimate-store-kit'),
2872 'type' => Controls_Manager::SLIDER,
2873 'range' => [
2874 'px' => [
2875 'min' => 10,
2876 'max' => 100,
2877 ],
2878 ],
2879 'selectors' => [
2880 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev i,
2881 {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next i' => 'font-size: {{SIZE || 24}}{{UNIT}};',
2882 ],
2883 'condition' => [
2884 'navigation!' => ['dots', 'progressbar', 'none'],
2885 ],
2886 ]
2887 );
2888
2889 $this->add_responsive_control(
2890 'arrows_space',
2891 [
2892 'label' => __('Space Between Arrows', 'ultimate-store-kit'),
2893 'type' => Controls_Manager::SLIDER,
2894 'range' => [
2895 'px' => [
2896 'min' => 0,
2897 'max' => 100,
2898 ],
2899 ],
2900 'selectors' => [
2901 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'margin-right: {{SIZE}}px;',
2902 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'margin-left: {{SIZE}}px;',
2903 ],
2904 'condition' => [
2905 'navigation!' => ['dots', 'progressbar', 'none'],
2906 ],
2907 ]
2908 );
2909
2910 $this->end_controls_tab();
2911
2912 $this->start_controls_tab(
2913 'tabs_nav_arrows_hover',
2914 [
2915 'label' => __('Hover', 'ultimate-store-kit'),
2916 'condition' => [
2917 'navigation!' => ['dots', 'progressbar', 'none'],
2918 ],
2919 ]
2920 );
2921
2922 $this->add_control(
2923 'arrows_hover_color',
2924 [
2925 'label' => __('Color', 'ultimate-store-kit'),
2926 'type' => Controls_Manager::COLOR,
2927 'selectors' => [
2928 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev:hover i, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next:hover i' => 'color: {{VALUE}}',
2929 ],
2930 'condition' => [
2931 'navigation!' => ['dots', 'progressbar', 'none'],
2932 ],
2933 ]
2934 );
2935
2936 $this->add_control(
2937 'arrows_hover_background',
2938 [
2939 'label' => __('Background', 'ultimate-store-kit'),
2940 'type' => Controls_Manager::COLOR,
2941 'selectors' => [
2942 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev:hover, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next:hover' => 'background-color: {{VALUE}}',
2943 ],
2944 'condition' => [
2945 'navigation!' => ['dots', 'progressbar', 'none'],
2946 ],
2947 ]
2948 );
2949
2950 $this->add_control(
2951 'nav_arrows_hover_border_color',
2952 [
2953 'label' => __('Border Color', 'ultimate-store-kit'),
2954 'type' => Controls_Manager::COLOR,
2955 'selectors' => [
2956 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev:hover, {{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next:hover' => 'border-color: {{VALUE}};',
2957 ],
2958 'condition' => [
2959 'nav_arrows_border_border!' => '',
2960 'navigation!' => ['dots', 'progressbar', 'none'],
2961 ],
2962 ]
2963 );
2964
2965 $this->end_controls_tab();
2966
2967 $this->end_controls_tabs();
2968
2969 $this->add_control(
2970 'hr_1',
2971 [
2972 'type' => Controls_Manager::DIVIDER,
2973 'condition' => [
2974 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2975 ],
2976 ]
2977 );
2978
2979 $this->add_control(
2980 'dots_heading',
2981 [
2982 'label' => __('Dots', 'ultimate-store-kit'),
2983 'type' => Controls_Manager::HEADING,
2984 'condition' => [
2985 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2986 ],
2987 ]
2988 );
2989
2990 $this->add_control(
2991 'hr_11',
2992 [
2993 'type' => Controls_Manager::DIVIDER,
2994 'condition' => [
2995 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
2996 ],
2997 ]
2998 );
2999
3000 $this->add_control(
3001 'dots_color',
3002 [
3003 'label' => __('Color', 'ultimate-store-kit'),
3004 'type' => Controls_Manager::COLOR,
3005 'selectors' => [
3006 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'background-color: {{VALUE}}',
3007 ],
3008 'condition' => [
3009 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3010 ],
3011 ]
3012 );
3013
3014 $this->add_control(
3015 'active_dot_color',
3016 [
3017 'label' => __('Active Color', 'ultimate-store-kit'),
3018 'type' => Controls_Manager::COLOR,
3019 'selectors' => [
3020 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet-active' => 'background-color: {{VALUE}}',
3021 ],
3022 'condition' => [
3023 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3024 ],
3025 ]
3026 );
3027
3028 $this->add_responsive_control(
3029 'dots_border_radius',
3030 [
3031 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
3032 'type' => Controls_Manager::DIMENSIONS,
3033 'size_units' => ['px', '%'],
3034 'selectors' => [
3035 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
3036 ],
3037 'condition' => [
3038 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3039 ],
3040 ]
3041 );
3042
3043 $this->add_responsive_control(
3044 'dots_width_size',
3045 [
3046 'label' => __('Width(px)', 'ultimate-store-kit'),
3047 'type' => Controls_Manager::SLIDER,
3048 'range' => [
3049 'px' => [
3050 'min' => 5,
3051 'max' => 50,
3052 ],
3053 ],
3054 'selectors' => [
3055 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'width: {{SIZE}}{{UNIT}};',
3056 ],
3057 'condition' => [
3058 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3059 ],
3060 ]
3061 );
3062
3063 $this->add_responsive_control(
3064 'dots_height_size',
3065 [
3066 'label' => __('Height(px)', 'ultimate-store-kit'),
3067 'type' => Controls_Manager::SLIDER,
3068 'range' => [
3069 'px' => [
3070 'min' => 5,
3071 'max' => 50,
3072 ],
3073 ],
3074 'selectors' => [
3075 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-bullet' => 'height: {{SIZE}}{{UNIT}};',
3076 ],
3077 'condition' => [
3078 'navigation!' => ['arrows', 'arrows-fraction', 'progressbar', 'none'],
3079 ],
3080 ]
3081 );
3082
3083 $this->add_control(
3084 'hr_22',
3085 [
3086 'type' => Controls_Manager::DIVIDER,
3087 'condition' => [
3088 'navigation' => 'arrows-fraction',
3089 ],
3090 ]
3091 );
3092
3093 $this->add_control(
3094 'fraction_heading',
3095 [
3096 'label' => __('Fraction', 'ultimate-store-kit'),
3097 'type' => Controls_Manager::HEADING,
3098 'condition' => [
3099 'navigation' => 'arrows-fraction',
3100 ],
3101 ]
3102 );
3103
3104 $this->add_control(
3105 'hr_12',
3106 [
3107 'type' => Controls_Manager::DIVIDER,
3108 'condition' => [
3109 'navigation' => 'arrows-fraction',
3110 ],
3111 ]
3112 );
3113
3114 $this->add_control(
3115 'fraction_color',
3116 [
3117 'label' => __('Color', 'ultimate-store-kit'),
3118 'type' => Controls_Manager::COLOR,
3119 'selectors' => [
3120 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-fraction' => 'color: {{VALUE}}',
3121 ],
3122 'condition' => [
3123 'navigation' => 'arrows-fraction',
3124 ],
3125 ]
3126 );
3127
3128 $this->add_control(
3129 'active_fraction_color',
3130 [
3131 'label' => __('Active Color', 'ultimate-store-kit'),
3132 'type' => Controls_Manager::COLOR,
3133 'selectors' => [
3134 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-current' => 'color: {{VALUE}}',
3135 ],
3136 'condition' => [
3137 'navigation' => 'arrows-fraction',
3138 ],
3139 ]
3140 );
3141
3142 $this->add_group_control(
3143 Group_Control_Typography::get_type(),
3144 [
3145 'name' => 'fraction_typography',
3146 'label' => esc_html__('Typography', 'ultimate-store-kit'),
3147 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-fraction',
3148 'condition' => [
3149 'navigation' => 'arrows-fraction',
3150 ],
3151 ]
3152 );
3153
3154 $this->add_control(
3155 'hr_3',
3156 [
3157 'type' => Controls_Manager::DIVIDER,
3158 'condition' => [
3159 'navigation' => 'progressbar',
3160 ],
3161 ]
3162 );
3163
3164 $this->add_control(
3165 'progresbar_heading',
3166 [
3167 'label' => __('Progresbar', 'ultimate-store-kit'),
3168 'type' => Controls_Manager::HEADING,
3169 'condition' => [
3170 'navigation' => 'progressbar',
3171 ],
3172 ]
3173 );
3174
3175 $this->add_control(
3176 'hr_13',
3177 [
3178 'type' => Controls_Manager::DIVIDER,
3179 'condition' => [
3180 'navigation' => 'progressbar',
3181 ],
3182 ]
3183 );
3184
3185 $this->add_control(
3186 'progresbar_color',
3187 [
3188 'label' => __('Bar Color', 'ultimate-store-kit'),
3189 'type' => Controls_Manager::COLOR,
3190 'selectors' => [
3191 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-progressbar' => 'background-color: {{VALUE}}',
3192 ],
3193 'condition' => [
3194 'navigation' => 'progressbar',
3195 ],
3196 ]
3197 );
3198
3199 $this->add_control(
3200 'progres_color',
3201 [
3202 'label' => __('Progress Color', 'ultimate-store-kit'),
3203 'type' => Controls_Manager::COLOR,
3204 'separator' => 'after',
3205 'selectors' => [
3206 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-progressbar .swiper-pagination-progressbar-fill' => 'background: {{VALUE}}',
3207 ],
3208 'condition' => [
3209 'navigation' => 'progressbar',
3210 ],
3211 ]
3212 );
3213
3214 $this->add_control(
3215 'hr_4',
3216 [
3217 'type' => Controls_Manager::DIVIDER,
3218 'condition' => [
3219 'show_scrollbar' => 'yes'
3220 ],
3221 ]
3222 );
3223
3224 $this->add_control(
3225 'scrollbar_heading',
3226 [
3227 'label' => __('Scrollbar', 'ultimate-store-kit'),
3228 'type' => Controls_Manager::HEADING,
3229 'condition' => [
3230 'show_scrollbar' => 'yes'
3231 ],
3232 ]
3233 );
3234
3235 $this->add_control(
3236 'hr_14',
3237 [
3238 'type' => Controls_Manager::DIVIDER,
3239 'condition' => [
3240 'show_scrollbar' => 'yes'
3241 ],
3242 ]
3243 );
3244
3245 $this->add_control(
3246 'scrollbar_color',
3247 [
3248 'label' => __('Bar Color', 'ultimate-store-kit'),
3249 'type' => Controls_Manager::COLOR,
3250 'selectors' => [
3251 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-scrollbar' => 'background: {{VALUE}}',
3252 ],
3253 'condition' => [
3254 'show_scrollbar' => 'yes'
3255 ],
3256 ]
3257 );
3258
3259 $this->add_control(
3260 'scrollbar_drag_color',
3261 [
3262 'label' => __('Drag Color', 'ultimate-store-kit'),
3263 'type' => Controls_Manager::COLOR,
3264 'selectors' => [
3265 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-scrollbar .swiper-scrollbar-drag' => 'background: {{VALUE}}',
3266 ],
3267 'condition' => [
3268 'show_scrollbar' => 'yes'
3269 ],
3270 ]
3271 );
3272
3273 $this->add_responsive_control(
3274 'scrollbar_height',
3275 [
3276 'label' => __('Height', 'ultimate-store-kit'),
3277 'type' => Controls_Manager::SLIDER,
3278 'range' => [
3279 'px' => [
3280 'min' => 1,
3281 'max' => 10,
3282 ],
3283 ],
3284 'selectors' => [
3285 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-container-horizontal > .swiper-scrollbar, {{WRAPPER}} .' . $this->get_name() . ' .swiper-horizontal > .swiper-scrollbar' => 'height: {{SIZE}}px;',
3286 ],
3287 'condition' => [
3288 'show_scrollbar' => 'yes'
3289 ],
3290 ]
3291 );
3292
3293 $this->add_control(
3294 'hr_05',
3295 [
3296 'type' => Controls_Manager::DIVIDER,
3297 ]
3298 );
3299
3300 $this->add_control(
3301 'navi_offset_heading',
3302 [
3303 'label' => __('Offset', 'ultimate-store-kit'),
3304 'type' => Controls_Manager::HEADING,
3305 ]
3306 );
3307
3308 $this->add_control(
3309 'hr_6',
3310 [
3311 'type' => Controls_Manager::DIVIDER,
3312 ]
3313 );
3314
3315 $this->add_responsive_control(
3316 'arrows_ncx_position',
3317 [
3318 'label' => __('Arrows Horizontal Offset', 'ultimate-store-kit'),
3319 'type' => Controls_Manager::SLIDER,
3320 'default' => [
3321 'size' => 0,
3322 ],
3323 'tablet_default' => [
3324 'size' => 0,
3325 ],
3326 'mobile_default' => [
3327 'size' => 0,
3328 ],
3329 'range' => [
3330 'px' => [
3331 'min' => -200,
3332 'max' => 200,
3333 ],
3334 ],
3335 'conditions' => [
3336 'terms' => [
3337 [
3338 'name' => 'navigation',
3339 'value' => 'arrows',
3340 ],
3341 [
3342 'name' => 'arrows_position',
3343 'operator' => '!=',
3344 'value' => 'center',
3345 ],
3346 ],
3347 ],
3348 'selectors' => [
3349 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-ncx: {{SIZE}}px;'
3350 ],
3351 ]
3352 );
3353
3354 $this->add_responsive_control(
3355 'arrows_ncy_position',
3356 [
3357 'label' => __('Arrows Vertical Offset', 'ultimate-store-kit'),
3358 'type' => Controls_Manager::SLIDER,
3359 'default' => [
3360 'size' => 0,
3361 ],
3362 'tablet_default' => [
3363 'size' => 0,
3364 ],
3365 'mobile_default' => [
3366 'size' => 0,
3367 ],
3368 'range' => [
3369 'px' => [
3370 'min' => -200,
3371 'max' => 200,
3372 ],
3373 ],
3374 'selectors' => [
3375 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-ncy: {{SIZE}}px;'
3376 ],
3377 'conditions' => [
3378 'terms' => [
3379 [
3380 'name' => 'navigation',
3381 'value' => 'arrows',
3382 ],
3383 // [
3384 // 'name' => 'arrows_position',
3385 // 'operator' => '!=',
3386 // 'value' => 'center',
3387 // ],
3388 ],
3389 ],
3390 ]
3391 );
3392
3393 $this->add_responsive_control(
3394 'arrows_acx_position',
3395 [
3396 'label' => __('Arrows Horizontal Offset', 'ultimate-store-kit'),
3397 'type' => Controls_Manager::SLIDER,
3398 'default' => [
3399 'size' => -60,
3400 ],
3401 'range' => [
3402 'px' => [
3403 'min' => -200,
3404 'max' => 200,
3405 ],
3406 ],
3407 'selectors' => [
3408 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'left: {{SIZE}}px;',
3409 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'right: {{SIZE}}px;',
3410 ],
3411 'conditions' => [
3412 'terms' => [
3413 [
3414 'name' => 'navigation',
3415 'value' => 'arrows',
3416 ],
3417 [
3418 'name' => 'arrows_position',
3419 'value' => 'center',
3420 ],
3421 ],
3422 ],
3423 ]
3424 );
3425
3426 $this->add_responsive_control(
3427 'dots_nnx_position',
3428 [
3429 'label' => __('Dots Horizontal Offset', 'ultimate-store-kit'),
3430 'type' => Controls_Manager::SLIDER,
3431 'default' => [
3432 'size' => 0,
3433 ],
3434 'tablet_default' => [
3435 'size' => 0,
3436 ],
3437 'mobile_default' => [
3438 'size' => 0,
3439 ],
3440 'range' => [
3441 'px' => [
3442 'min' => -200,
3443 'max' => 200,
3444 ],
3445 ],
3446 'conditions' => [
3447 'terms' => [
3448 [
3449 'name' => 'navigation',
3450 'value' => 'dots',
3451 ],
3452 [
3453 'name' => 'dots_position',
3454 'operator' => '!=',
3455 'value' => '',
3456 ],
3457 ],
3458 ],
3459 'selectors' => [
3460 '{{WRAPPER}}' => '--usk-swiper-carousel-dots-nnx: {{SIZE}}px;'
3461 ],
3462 ]
3463 );
3464
3465 $this->add_responsive_control(
3466 'dots_nny_position',
3467 [
3468 'label' => __('Dots Vertical Offset', 'ultimate-store-kit'),
3469 'type' => Controls_Manager::SLIDER,
3470 'default' => [
3471 'size' => 30,
3472 ],
3473 'tablet_default' => [
3474 'size' => 30,
3475 ],
3476 'mobile_default' => [
3477 'size' => 30,
3478 ],
3479 'range' => [
3480 'px' => [
3481 'min' => -200,
3482 'max' => 200,
3483 ],
3484 ],
3485 'conditions' => [
3486 'terms' => [
3487 [
3488 'name' => 'navigation',
3489 'value' => 'dots',
3490 ],
3491 [
3492 'name' => 'dots_position',
3493 'operator' => '!=',
3494 'value' => '',
3495 ],
3496 ],
3497 ],
3498 'selectors' => [
3499 '{{WRAPPER}}' => '--usk-swiper-carousel-dots-nny: {{SIZE}}px;'
3500 ],
3501 ]
3502 );
3503
3504 $this->add_responsive_control(
3505 'both_ncx_position',
3506 [
3507 'label' => __('Arrows & Dots Horizontal Offset', 'ultimate-store-kit'),
3508 'type' => Controls_Manager::SLIDER,
3509 'default' => [
3510 'size' => 0,
3511 ],
3512 'tablet_default' => [
3513 'size' => 0,
3514 ],
3515 'mobile_default' => [
3516 'size' => 0,
3517 ],
3518 'range' => [
3519 'px' => [
3520 'min' => -200,
3521 'max' => 200,
3522 ],
3523 ],
3524 'conditions' => [
3525 'terms' => [
3526 [
3527 'name' => 'navigation',
3528 'value' => 'both',
3529 ],
3530 [
3531 'name' => 'both_position',
3532 'operator' => '!=',
3533 'value' => 'center',
3534 ],
3535 ],
3536 ],
3537 'selectors' => [
3538 '{{WRAPPER}}' => '--usk-swiper-carousel-both-ncx: {{SIZE}}px;'
3539 ],
3540 ]
3541 );
3542
3543 $this->add_responsive_control(
3544 'both_ncy_position',
3545 [
3546 'label' => __('Arrows & Dots Vertical Offset', 'ultimate-store-kit'),
3547 'type' => Controls_Manager::SLIDER,
3548 'default' => [
3549 'size' => 0,
3550 ],
3551 'tablet_default' => [
3552 'size' => 0,
3553 ],
3554 'mobile_default' => [
3555 'size' => 0,
3556 ],
3557 'range' => [
3558 'px' => [
3559 'min' => -200,
3560 'max' => 200,
3561 ],
3562 ],
3563 'conditions' => [
3564 'terms' => [
3565 [
3566 'name' => 'navigation',
3567 'value' => 'both',
3568 ],
3569 [
3570 'name' => 'both_position',
3571 'operator' => '!=',
3572 'value' => 'center',
3573 ],
3574 ],
3575 ],
3576 'selectors' => [
3577 '{{WRAPPER}}' => '--usk-swiper-carousel-both-ncy: {{SIZE}}px;'
3578 ],
3579 ]
3580 );
3581
3582 $this->add_responsive_control(
3583 'both_cx_position',
3584 [
3585 'label' => __('Arrows Offset', 'ultimate-store-kit'),
3586 'type' => Controls_Manager::SLIDER,
3587 'default' => [
3588 'size' => -60,
3589 ],
3590 'range' => [
3591 'px' => [
3592 'min' => -200,
3593 'max' => 200,
3594 ],
3595 ],
3596 'selectors' => [
3597 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'left: {{SIZE}}px;',
3598 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'right: {{SIZE}}px;',
3599 ],
3600 'conditions' => [
3601 'terms' => [
3602 [
3603 'name' => 'navigation',
3604 'value' => 'both',
3605 ],
3606 [
3607 'name' => 'both_position',
3608 'value' => 'center',
3609 ],
3610 ],
3611 ],
3612 ]
3613 );
3614
3615 $this->add_responsive_control(
3616 'both_cy_position',
3617 [
3618 'label' => __('Dots Offset', 'ultimate-store-kit'),
3619 'type' => Controls_Manager::SLIDER,
3620 'default' => [
3621 'size' => 30,
3622 ],
3623 'range' => [
3624 'px' => [
3625 'min' => -200,
3626 'max' => 200,
3627 ],
3628 ],
3629 'selectors' => [
3630 '{{WRAPPER}} .' . $this->get_name() . ' .usk-dots-container' => 'transform: translateY({{SIZE}}px);',
3631 ],
3632 'conditions' => [
3633 'terms' => [
3634 [
3635 'name' => 'navigation',
3636 'value' => 'both',
3637 ],
3638 [
3639 'name' => 'both_position',
3640 'value' => 'center',
3641 ],
3642 ],
3643 ],
3644 ]
3645 );
3646
3647 $this->add_responsive_control(
3648 'arrows_fraction_ncx_position',
3649 [
3650 'label' => __('Arrows & Fraction Horizontal Offset', 'ultimate-store-kit'),
3651 'type' => Controls_Manager::SLIDER,
3652 'default' => [
3653 'size' => 0,
3654 ],
3655 'tablet_default' => [
3656 'size' => 0,
3657 ],
3658 'mobile_default' => [
3659 'size' => 0,
3660 ],
3661 'range' => [
3662 'px' => [
3663 'min' => -200,
3664 'max' => 200,
3665 ],
3666 ],
3667 'conditions' => [
3668 'terms' => [
3669 [
3670 'name' => 'navigation',
3671 'value' => 'arrows-fraction',
3672 ],
3673 [
3674 'name' => 'arrows_fraction_position',
3675 'operator' => '!=',
3676 'value' => 'center',
3677 ],
3678 ],
3679 ],
3680 'selectors' => [
3681 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-fraction-ncx: {{SIZE}}px;'
3682 ],
3683 ]
3684 );
3685
3686 $this->add_responsive_control(
3687 'arrows_fraction_ncy_position',
3688 [
3689 'label' => __('Arrows & Fraction Vertical Offset', 'ultimate-store-kit'),
3690 'type' => Controls_Manager::SLIDER,
3691 'default' => [
3692 'size' => 0,
3693 ],
3694 'tablet_default' => [
3695 'size' => 0,
3696 ],
3697 'mobile_default' => [
3698 'size' => 0,
3699 ],
3700 'range' => [
3701 'px' => [
3702 'min' => -200,
3703 'max' => 200,
3704 ],
3705 ],
3706 'conditions' => [
3707 'terms' => [
3708 [
3709 'name' => 'navigation',
3710 'value' => 'arrows-fraction',
3711 ],
3712 [
3713 'name' => 'arrows_fraction_position',
3714 'operator' => '!=',
3715 'value' => 'center',
3716 ],
3717 ],
3718 ],
3719 'selectors' => [
3720 '{{WRAPPER}}' => '--usk-swiper-carousel-arrows-fraction-ncy: {{SIZE}}px;'
3721 ],
3722 ]
3723 );
3724
3725 $this->add_responsive_control(
3726 'arrows_fraction_cx_position',
3727 [
3728 'label' => __('Arrows Offset', 'ultimate-store-kit'),
3729 'type' => Controls_Manager::SLIDER,
3730 'default' => [
3731 'size' => -60,
3732 ],
3733 'range' => [
3734 'px' => [
3735 'min' => -200,
3736 'max' => 200,
3737 ],
3738 ],
3739 'selectors' => [
3740 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-prev' => 'left: {{SIZE}}px;',
3741 '{{WRAPPER}} .' . $this->get_name() . ' .usk-navigation-next' => 'right: {{SIZE}}px;',
3742 ],
3743 'conditions' => [
3744 'terms' => [
3745 [
3746 'name' => 'navigation',
3747 'value' => 'arrows-fraction',
3748 ],
3749 [
3750 'name' => 'arrows_fraction_position',
3751 'value' => 'center',
3752 ],
3753 ],
3754 ],
3755 ]
3756 );
3757
3758 $this->add_responsive_control(
3759 'arrows_fraction_cy_position',
3760 [
3761 'label' => __('Fraction Offset', 'ultimate-store-kit'),
3762 'type' => Controls_Manager::SLIDER,
3763 'default' => [
3764 'size' => 30,
3765 ],
3766 'range' => [
3767 'px' => [
3768 'min' => -200,
3769 'max' => 200,
3770 ],
3771 ],
3772 'selectors' => [
3773 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-fraction' => 'transform: translateY({{SIZE}}px);',
3774 ],
3775 'conditions' => [
3776 'terms' => [
3777 [
3778 'name' => 'navigation',
3779 'value' => 'arrows-fraction',
3780 ],
3781 [
3782 'name' => 'arrows_fraction_position',
3783 'value' => 'center',
3784 ],
3785 ],
3786 ],
3787 ]
3788 );
3789
3790 $this->add_responsive_control(
3791 'progress_y_position',
3792 [
3793 'label' => __('Progress Offset', 'ultimate-store-kit'),
3794 'type' => Controls_Manager::SLIDER,
3795 'default' => [
3796 'size' => 15,
3797 ],
3798 'range' => [
3799 'px' => [
3800 'min' => -200,
3801 'max' => 200,
3802 ],
3803 ],
3804 'selectors' => [
3805 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-pagination-progressbar' => 'transform: translateY({{SIZE}}px);',
3806 ],
3807 'condition' => [
3808 'navigation' => 'progressbar',
3809 ],
3810 ]
3811 );
3812
3813 $this->add_responsive_control(
3814 'scrollbar_vertical_offset',
3815 [
3816 'label' => __('Scrollbar Offset', 'ultimate-store-kit'),
3817 'type' => Controls_Manager::SLIDER,
3818 'selectors' => [
3819 '{{WRAPPER}} .' . $this->get_name() . ' .swiper-container-horizontal > .swiper-scrollbar, {{WRAPPER}} .' . $this->get_name() . ' .swiper-horizontal > .swiper-scrollbar' => 'bottom: {{SIZE}}px;',
3820 ],
3821 'condition' => [
3822 'show_scrollbar' => 'yes'
3823 ],
3824 ]
3825 );
3826
3827 $this->end_controls_section();
3828 }
3829 protected function register_global_controls_carousel_settings() {
3830 $this->start_controls_section(
3831 'section_carousel_settings',
3832 [
3833 'label' => __('Carousel Settings', 'ultimate-store-kit'),
3834 ]
3835 );
3836
3837 $this->add_control(
3838 'skin',
3839 [
3840 'label' => esc_html__('Layout', 'ultimate-store-kit'),
3841 'type' => Controls_Manager::SELECT,
3842 'default' => 'carousel',
3843 'options' => [
3844 'carousel' => esc_html__('Carousel', 'ultimate-store-kit'),
3845 'coverflow' => esc_html__('Coverflow', 'ultimate-store-kit'),
3846 ],
3847 'prefix_class' => 'usk-carousel-style-',
3848 'render_type' => 'template',
3849 ]
3850 );
3851
3852 $this->add_control(
3853 'coverflow_toggle',
3854 [
3855 'label' => __('Coverflow Effect', 'ultimate-store-kit'),
3856 'type' => Controls_Manager::POPOVER_TOGGLE,
3857 'return_value' => 'yes',
3858 'condition' => [
3859 'skin' => 'coverflow'
3860 ]
3861 ]
3862 );
3863
3864 $this->start_popover();
3865
3866 $this->add_control(
3867 'coverflow_rotate',
3868 [
3869 'label' => esc_html__('Rotate', 'ultimate-store-kit'),
3870 'type' => Controls_Manager::SLIDER,
3871 'default' => [
3872 'size' => 50,
3873 ],
3874 'range' => [
3875 'px' => [
3876 'min' => -360,
3877 'max' => 360,
3878 'step' => 5,
3879 ],
3880 ],
3881 'condition' => [
3882 'coverflow_toggle' => 'yes'
3883 ],
3884 'render_type' => 'template',
3885 ]
3886 );
3887
3888 $this->add_control(
3889 'coverflow_stretch',
3890 [
3891 'label' => __('Stretch', 'ultimate-store-kit'),
3892 'type' => Controls_Manager::SLIDER,
3893 'default' => [
3894 'size' => 0,
3895 ],
3896 'range' => [
3897 'px' => [
3898 'min' => 0,
3899 'step' => 10,
3900 'max' => 100,
3901 ],
3902 ],
3903 'condition' => [
3904 'coverflow_toggle' => 'yes'
3905 ],
3906 'render_type' => 'template',
3907 ]
3908 );
3909
3910 $this->add_control(
3911 'coverflow_modifier',
3912 [
3913 'label' => __('Modifier', 'ultimate-store-kit'),
3914 'type' => Controls_Manager::SLIDER,
3915 'default' => [
3916 'size' => 1,
3917 ],
3918 'range' => [
3919 'px' => [
3920 'min' => 1,
3921 'step' => 1,
3922 'max' => 10,
3923 ],
3924 ],
3925 'condition' => [
3926 'coverflow_toggle' => 'yes'
3927 ],
3928 'render_type' => 'template',
3929 ]
3930 );
3931
3932 $this->add_control(
3933 'coverflow_depth',
3934 [
3935 'label' => __('Depth', 'ultimate-store-kit'),
3936 'type' => Controls_Manager::SLIDER,
3937 'default' => [
3938 'size' => 100,
3939 ],
3940 'range' => [
3941 'px' => [
3942 'min' => 0,
3943 'step' => 10,
3944 'max' => 1000,
3945 ],
3946 ],
3947 'condition' => [
3948 'coverflow_toggle' => 'yes'
3949 ],
3950 'render_type' => 'template',
3951 ]
3952 );
3953
3954 $this->end_popover();
3955
3956 $this->add_control(
3957 'hr_005',
3958 [
3959 'type' => Controls_Manager::DIVIDER,
3960 'condition' => [
3961 'skin' => 'coverflow'
3962 ]
3963 ]
3964 );
3965
3966 $this->add_control(
3967 'autoplay',
3968 [
3969 'label' => __('Autoplay', 'ultimate-store-kit'),
3970 'type' => Controls_Manager::SWITCHER,
3971 'default' => 'yes',
3972
3973 ]
3974 );
3975
3976 $this->add_control(
3977 'autoplay_speed',
3978 [
3979 'label' => esc_html__('Autoplay Speed', 'ultimate-store-kit'),
3980 'type' => Controls_Manager::NUMBER,
3981 'default' => 5000,
3982 'condition' => [
3983 'autoplay' => 'yes',
3984 ],
3985 ]
3986 );
3987
3988 $this->add_control(
3989 'pauseonhover',
3990 [
3991 'label' => esc_html__('Pause on Hover', 'ultimate-store-kit'),
3992 'type' => Controls_Manager::SWITCHER,
3993 ]
3994 );
3995
3996 $this->add_responsive_control(
3997 'slides_to_scroll',
3998 [
3999 'type' => Controls_Manager::SELECT,
4000 'label' => esc_html__('Slides to Scroll', 'ultimate-store-kit'),
4001 'default' => 1,
4002 'tablet_default' => 1,
4003 'mobile_default' => 1,
4004 'options' => [
4005 1 => '1',
4006 2 => '2',
4007 3 => '3',
4008 4 => '4',
4009 5 => '5',
4010 6 => '6',
4011 ],
4012 ]
4013 );
4014
4015 $this->add_control(
4016 'centered_slides',
4017 [
4018 'label' => __('Center Slide', 'ultimate-store-kit'),
4019 'description' => __('Use even items from Layout > Columns settings for better preview.', 'ultimate-store-kit'),
4020 'type' => Controls_Manager::SWITCHER,
4021 ]
4022 );
4023
4024 $this->add_control(
4025 'grab_cursor',
4026 [
4027 'label' => __('Grab Cursor', 'ultimate-store-kit'),
4028 'type' => Controls_Manager::SWITCHER,
4029 ]
4030 );
4031
4032 $this->add_control(
4033 'loop',
4034 [
4035 'label' => __('Loop', 'ultimate-store-kit'),
4036 'type' => Controls_Manager::SWITCHER,
4037 'default' => 'yes',
4038
4039 ]
4040 );
4041
4042
4043 $this->add_control(
4044 'speed',
4045 [
4046 'label' => __('Animation Speed (ms)', 'ultimate-store-kit'),
4047 'type' => Controls_Manager::SLIDER,
4048 'default' => [
4049 'size' => 500,
4050 ],
4051 'range' => [
4052 'px' => [
4053 'min' => 100,
4054 'max' => 5000,
4055 'step' => 50,
4056 ],
4057 ],
4058 ]
4059 );
4060
4061 $this->add_control(
4062 'observer',
4063 [
4064 'label' => __('Observer', 'ultimate-store-kit'),
4065 'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'ultimate-store-kit'),
4066 'type' => Controls_Manager::SWITCHER,
4067 ]
4068 );
4069
4070 $this->add_responsive_control(
4071 'item_shadow_padding',
4072 [
4073 'label' => __('Match Padding', 'ultimate-store-kit'),
4074 'description' => __('You have to add padding for matching overlaping normal/hover box shadow when you used Box Shadow option.', 'ultimate-store-kit'),
4075 'type' => Controls_Manager::SLIDER,
4076 'range' => [
4077 'px' => [
4078 'min' => 0,
4079 'step' => 1,
4080 'max' => 50,
4081 ]
4082 ],
4083 'default' => [
4084 'size' => 10
4085 ],
4086 'selectors' => [
4087 '{{WRAPPER}} .swiper-carousel' => 'padding: {{SIZE}}{{UNIT}}; margin: 0 -{{SIZE}}{{UNIT}};'
4088 ],
4089 ]
4090 );
4091
4092 $this->end_controls_section();
4093 }
4094 }
4095