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

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