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

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