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-edd-widget-controls.php

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

1,582 lines 59.9 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
14 // use UltimateStoreKit\Modules\QueryControl\Controls\Group_Control_Posts;
15
16 defined('ABSPATH') || die();
17
18
19 trait Global_EDD_Widget_Controls {
20 protected function register_global_edd_controls_carousel_layout() {
21 $this->start_controls_section(
22 'section_woocommerce_layout',
23 [
24 'label' => esc_html__('Layout', 'ultimate-store-kit'),
25 ]
26 );
27
28 $this->add_responsive_control(
29 'columns',
30 [
31 'label' => esc_html__('Columns', 'ultimate-store-kit'),
32 'type' => Controls_Manager::SELECT,
33 'default' => 3,
34 'tablet_default' => 2,
35 'mobile_default' => 1,
36 'options' => [
37 1 => '1',
38 2 => '2',
39 3 => '3',
40 4 => '4',
41 5 => '5',
42 6 => '6',
43 ],
44 ]
45 );
46 $this->add_responsive_control(
47 'items_gap',
48 [
49 'label' => esc_html__('Item Gap', 'ultimate-store-kit'),
50 'type' => Controls_Manager::SLIDER,
51 'default' => [
52 'size' => 30,
53 ],
54 'range' => [
55 'px' => [
56 'min' => 0,
57 'max' => 100,
58 ],
59 ],
60 'tablet_default' => [
61 'size' => 20,
62 ],
63 'mobile_default' => [
64 'size' => 20,
65 ],
66 ]
67 );
68 $this->add_control(
69 'alignment',
70 [
71 'label' => __('Alignment', 'ultimate-store-kit'),
72 'type' => Controls_Manager::CHOOSE,
73 'options' => [
74 'left' => [
75 'title' => __('Left', 'ultimate-store-kit'),
76 'icon' => 'eicon-h-align-left',
77 ],
78 'center' => [
79 'title' => __('Center', 'ultimate-store-kit'),
80 'icon' => 'eicon-h-align-center',
81 ],
82 'right' => [
83 'title' => __('Right', 'ultimate-store-kit'),
84 'icon' => 'eicon-h-align-right',
85 ],
86 ],
87 'default' => 'center',
88 'selectors' => [
89 '{{WRAPPER}} .' . $this->get_name() . ' .usk-top-content' => 'text-align:{{VALUE}}',
90 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-content .usk-edd-price' => 'justify-content:{{VALUE}}',
91 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-content' => 'text-align:{{VALUE}}',
92 ]
93 ]
94 );
95 $this->add_group_control(
96 Group_Control_Image_Size::get_type(),
97 [
98 'name' => 'image',
99 'label' => esc_html__('Image Size', 'ultimate-store-kit'),
100 'exclude' => ['custom'],
101 'default' => 'medium',
102 ]
103 );
104
105 $this->end_controls_section();
106 }
107 public function register_global_edd_controls_grid_layout() {
108 $this->start_controls_section(
109 'section_edd_grid_layout',
110 [
111 'label' => esc_html__('Layout', 'ultimate-store-kit'),
112 ]
113 );
114
115 $this->add_responsive_control(
116 'columns',
117 [
118 'label' => esc_html__('Columns', 'ultimate-store-kit'),
119 'type' => Controls_Manager::SELECT,
120 'default' => '3',
121 'tablet_default' => '2',
122 'mobile_default' => '1',
123 'options' => [
124 '1' => '1',
125 '2' => '2',
126 '3' => '3',
127 '4' => '4',
128 '5' => '5',
129 '6' => '6',
130 ],
131 'selectors' => [
132 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-wrapper' => 'grid-template-columns: repeat({{VALUE}}, 1fr)'
133 ]
134 ]
135 );
136
137 $this->add_responsive_control(
138 'items_columns_gap',
139 [
140 'label' => esc_html__('Columns Gap', 'ultimate-store-kit'),
141 'type' => Controls_Manager::SLIDER,
142 'default' => [
143 'size' => 30,
144 ],
145 'selectors' => [
146 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-wrapper' => 'grid-column-gap: {{SIZE}}px;',
147 ],
148 ]
149 );
150
151 $this->add_responsive_control(
152 'items_row_gap',
153 [
154 'label' => esc_html__('Row Gap', 'ultimate-store-kit'),
155 'type' => Controls_Manager::SLIDER,
156 'default' => [
157 'size' => 30,
158 ],
159 'selectors' => [
160 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-wrapper' => 'grid-row-gap: {{SIZE}}px;',
161 ],
162 ]
163 );
164 $this->add_control(
165 'alignment',
166 [
167 'label' => __('Alignment', 'ultimate-store-kit'),
168 'type' => Controls_Manager::CHOOSE,
169 'options' => [
170 'left' => [
171 'title' => __('Left', 'ultimate-store-kit'),
172 'icon' => 'eicon-h-align-left',
173 ],
174 'center' => [
175 'title' => __('Center', 'ultimate-store-kit'),
176 'icon' => 'eicon-h-align-center',
177 ],
178 'right' => [
179 'title' => __('Right', 'ultimate-store-kit'),
180 'icon' => 'eicon-h-align-right',
181 ],
182 ],
183 'selectors' => [
184 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-content .usk-edd-price' => 'justify-content:{{VALUE}}',
185 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item-box' => 'text-align:{{VALUE}}',
186 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-content' => 'text-align:{{VALUE}}',
187 ]
188 ]
189 );
190 $this->add_control(
191 'show_tab',
192 [
193 'label' => __('Title', 'ultimate-store-kit'),
194 'type' => Controls_Manager::HIDDEN,
195 'default' => 'traditional',
196 ]
197 );
198 $this->add_group_control(
199 Group_Control_Image_Size::get_type(),
200 [
201 'name' => 'image',
202 'label' => esc_html__('Image Size', 'ultimate-store-kit'),
203 'exclude' => ['custom'],
204 'default' => 'medium',
205 ]
206 );
207 $this->add_control(
208 'show_pagination',
209 [
210 'label' => esc_html__('Pagination', 'ultimate-store-kit'),
211 'type' => Controls_Manager::SWITCHER,
212 ]
213 );
214 $this->end_controls_section();
215 }
216 protected function register_global_edd_controls_query() {
217 $this->start_controls_section(
218 'section_post_query_builder',
219 [
220 'label' => __('Query', 'ultimate-store-kit'),
221 'tab' => Controls_Manager::TAB_CONTENT,
222 ]
223 );
224
225 $this->register_query_builder_controls();
226
227 $this->update_control(
228 'product_source',
229 [
230 'type' => Controls_Manager::SELECT,
231 'default' => 'download',
232 'options' => [
233 'download' => "Download",
234 'manual_selection' => __('Manual Selection', 'ultimate-store-kit'),
235 'current_query' => __('Current Query', 'ultimate-store-kit'),
236 '_related_post_type' => __('Related', 'ultimate-store-kit'),
237 ],
238 ]
239 );
240 $this->update_control(
241 'product_limit',
242 [
243 'label' => esc_html__('Product Limit', 'ultimate-store-kit'),
244 'type' => Controls_Manager::NUMBER,
245 'default' => 6,
246 ]
247 );
248
249 $this->update_control(
250 'posts_selected_ids',
251 [
252 'query_args' => [
253 'query' => 'posts',
254 'post_type' => 'download'
255 ],
256 ]
257 );
258 $this->update_control(
259 'posts_offset',
260 [
261 'label' => __('Offset', 'ultimate-store-kit'),
262 'type' => Controls_Manager::NUMBER,
263 'default' => 0,
264
265 ]
266 );
267 $this->add_control(
268 'query_id',
269 [
270 'label' => __('Query ID', 'ultimate-store-kit'),
271 'description' => __('Give your Query a custom unique id to allow server side filtering', 'ultimate-store-kit'),
272 'type' => Controls_Manager::TEXT,
273 'separator' => 'before',
274 'dynamic' => [ 'active' => true, ],
275 ]
276 );
277 $this->end_controls_section();
278 }
279 protected function register_global_edd_controls_additional() {
280 $this->start_controls_section(
281 'section_edd_additional',
282 [
283 'label' => esc_html__('Additional Options', 'ultimate-store-kit'),
284 ]
285 );
286 $this->add_control(
287 'show_title',
288 [
289 'label' => esc_html__('Title', 'ultimate-store-kit'),
290 'type' => Controls_Manager::SWITCHER,
291 'default' => 'yes'
292 ]
293 );
294 $this->add_control(
295 'title_tags',
296 [
297 'label' => esc_html__('Title HTML Tag', 'ultimate-store-kit'),
298 'type' => Controls_Manager::SELECT,
299 'default' => 'h3',
300 'options' => ultimate_store_kit_title_tags(),
301 'condition' => [
302 'show_title' => 'yes'
303 ]
304 ]
305 );
306 $this->add_control(
307 'show_category',
308 [
309 'label' => esc_html__('Category', 'ultimate-store-kit'),
310 'type' => Controls_Manager::SWITCHER,
311 'default' => 'yes',
312 'separator' => 'before'
313 ]
314 );
315 $this->add_control(
316 'category_tags',
317 [
318 'label' => esc_html__('Category HTML Tag', 'ultimate-store-kit'),
319 'type' => Controls_Manager::SELECT,
320 'default' => 'h5',
321 'options' => ultimate_store_kit_title_tags(),
322 'condition' => [
323 'show_category' => 'yes',
324 ],
325 ]
326 );
327 $this->add_control(
328 'show_price',
329 [
330 'label' => esc_html__('Price', 'ultimate-store-kit'),
331 'type' => Controls_Manager::SWITCHER,
332 'default' => 'yes',
333 ]
334 );
335 $this->end_controls_section();
336 }
337
338 protected function register_global_edd_controls_grid_columns() {
339 $this->start_controls_section(
340 'section_style_columns_filter',
341 [
342 'label' => esc_html__('Columns Filter', 'ultimate-store-kit'),
343 'tab' => Controls_Manager::TAB_STYLE,
344 'condition' => ['show_tab' => 'yes']
345 ]
346 );
347
348 $this->start_controls_tabs('style_columns_filter_tabs');
349
350 $this->start_controls_tab(
351 'tab_columns_filter_normal',
352 [
353 'label' => esc_html__('Normal', 'ultimate-store-kit'),
354 ]
355 );
356
357 $this->add_control(
358 'columns_filter_color',
359 [
360 'label' => esc_html__('Color', 'ultimate-store-kit'),
361 'type' => Controls_Manager::COLOR,
362 'selectors' => [
363 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list a' => 'color: {{VALUE}}',
364 ],
365 ]
366 );
367
368 $this->add_group_control(
369 Group_Control_Background::get_type(),
370 [
371 'name' => 'columns_filter_background',
372 'exclude' => ['image'],
373 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list a',
374 ]
375 );
376
377 $this->add_responsive_control(
378 'columns_filter_border_width',
379 [
380 'label' => esc_html__('Border Width', 'ultimate-store-kit'),
381 'type' => Controls_Manager::SLIDER,
382 'default' => [
383 'size' => 1,
384 ],
385 'range' => [
386 'px' => [
387 'min' => 0,
388 'max' => 10,
389 ],
390 ],
391 'selectors' => [
392 '{{WRAPPER}}' => '--usk-filter-border-width: {{SIZE}}{{UNIT}};',
393 ],
394 'separator' => 'before',
395 ]
396 );
397
398 $this->add_control(
399 'columns_filter_border_color',
400 [
401 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
402 'type' => Controls_Manager::COLOR,
403 'selectors' => [
404 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list a' => 'border-color: {{VALUE}}',
405 ],
406 ]
407 );
408
409 $this->add_responsive_control(
410 'columns_filter_padding',
411 [
412 'label' => esc_html__('Padding', 'ultimate-store-kit'),
413 'type' => Controls_Manager::DIMENSIONS,
414 'size_units' => ['px', '%', 'em'],
415 'selectors' => [
416 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
417 ],
418 ]
419 );
420
421 $this->add_responsive_control(
422 'columns_filter_margin',
423 [
424 'label' => esc_html__('Margin', 'ultimate-store-kit'),
425 'type' => Controls_Manager::DIMENSIONS,
426 'size_units' => ['px', '%', 'em'],
427 'selectors' => [
428 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
429 ],
430 ]
431 );
432
433 $this->end_controls_tab();
434
435 $this->start_controls_tab(
436 'tab_columns_filter_hover',
437 [
438 'label' => esc_html__('Hover', 'ultimate-store-kit'),
439 ]
440 );
441
442 $this->add_control(
443 'columns_filter_hover_color',
444 [
445 'label' => esc_html__('Color', 'ultimate-store-kit'),
446 'type' => Controls_Manager::COLOR,
447 'selectors' => [
448 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list a:hover' => 'color: {{VALUE}}',
449 ],
450 ]
451 );
452
453 $this->add_group_control(
454 Group_Control_Background::get_type(),
455 [
456 'name' => 'columns_filter_hover_background',
457 'exclude' => ['image'],
458 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list a:hover',
459 ]
460 );
461
462 $this->end_controls_tab();
463
464 $this->start_controls_tab(
465 'tab_columns_filter_active',
466 [
467 'label' => esc_html__('Active', 'ultimate-store-kit'),
468 ]
469 );
470
471 $this->add_control(
472 'columns_filter_active_color',
473 [
474 'label' => esc_html__('Color', 'ultimate-store-kit'),
475 'type' => Controls_Manager::COLOR,
476 'selectors' => [
477 '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list.usk-tabs-active a' => 'color: {{VALUE}}',
478 ],
479 ]
480 );
481
482 $this->add_group_control(
483 Group_Control_Background::get_type(),
484 [
485 'name' => 'columns_filter_active_background',
486 'exclude' => ['image'],
487 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-grid-header .usk-grid-header-tabs .usk-grid-tabs-list.usk-tabs-active a',
488 ]
489 );
490
491 $this->end_controls_tab();
492 $this->end_controls_tabs();
493 $this->end_controls_section();
494 }
495 protected function register_global_edd_style_controls_items() {
496 $this->start_controls_section(
497 'section_style_item',
498 [
499 'label' => esc_html__('Item', 'ultimate-store-kit'),
500 'tab' => Controls_Manager::TAB_STYLE,
501 ]
502 );
503
504 $this->start_controls_tabs('tabs_item_style');
505
506 $this->start_controls_tab(
507 'tab_item_normal',
508 [
509 'label' => esc_html__('Normal', 'ultimate-store-kit'),
510 ]
511 );
512
513 $this->add_group_control(
514 Group_Control_Background::get_type(),
515 [
516 'name' => 'item_background',
517 'label' => __('Background', 'ultimate-store-kit'),
518 'types' => ['classic', 'gradient'],
519 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item',
520 ]
521 );
522
523 $this->add_group_control(
524 Group_Control_Border::get_type(),
525 [
526 'name' => 'item_border',
527 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
528 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item',
529 'separator' => 'before',
530 ]
531 );
532
533 $this->add_responsive_control(
534 'item_radius',
535 [
536 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
537 'type' => Controls_Manager::DIMENSIONS,
538 'size_units' => ['px', '%'],
539 'selectors' => [
540 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
541 ],
542 ]
543 );
544
545 $this->add_group_control(
546 Group_Control_Box_Shadow::get_type(),
547 [
548 'name' => 'item_shadow',
549 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item',
550 ]
551 );
552
553 $this->add_responsive_control(
554 'item_padding',
555 [
556 'label' => esc_html__('Item Padding', 'ultimate-store-kit'),
557 'type' => Controls_Manager::DIMENSIONS,
558 'size_units' => ['px', 'em', '%'],
559 'selectors' => [
560 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
561 ],
562 ]
563 );
564
565 $this->add_responsive_control(
566 'content_padding',
567 [
568 'label' => esc_html__('Content Padding', 'ultimate-store-kit'),
569 'type' => Controls_Manager::DIMENSIONS,
570 'size_units' => ['px', 'em', '%'],
571 'selectors' => [
572 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item .usk-edd-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
573 ],
574 ]
575 );
576
577 $this->end_controls_tab();
578
579 $this->start_controls_tab(
580 'tab_item_hover',
581 [
582 'label' => esc_html__('Hover', 'ultimate-store-kit'),
583 ]
584 );
585
586 $this->add_group_control(
587 Group_Control_Background::get_type(),
588 [
589 'name' => 'item_hover_background',
590 'label' => __('Background', 'ultimate-store-kit'),
591 'types' => ['classic', 'gradient'],
592 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item:hover',
593 ]
594 );
595
596 $this->add_control(
597 'item_hover_border_color',
598 [
599 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
600 'type' => Controls_Manager::COLOR,
601 'condition' => [
602 'item_border_border!' => '',
603 ],
604 'selectors' => [
605 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item:hover' => 'border-color: {{VALUE}};',
606 ],
607 ]
608 );
609
610 $this->add_group_control(
611 Group_Control_Box_Shadow::get_type(),
612 [
613 'name' => 'item_hover_shadow',
614 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item:hover',
615 ]
616 );
617
618 $this->end_controls_tab();
619
620 $this->end_controls_tabs();
621 if (($this->get_name() == 'usk-edd-trendy-grid') || ($this->get_name() == 'usk-edd-trendy-carousel')) :
622 $this->add_control(
623 'item_line_animation',
624 [
625 'label' => __('Line Animation', 'ultimate-store-kit'),
626 'type' => Controls_Manager::HEADING,
627 'separator' => 'before',
628 ]
629 );
630 $this->add_control(
631 'item_line_animation_color',
632 [
633 'label' => __('Color', 'ultimate-store-kit'),
634 'type' => Controls_Manager::COLOR,
635 'selectors' => [
636 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item::before' => 'background-color: {{VALUE}}',
637 ],
638 ]
639 );
640 $this->add_responsive_control(
641 'item_line_animation_height',
642 [
643 'label' => __('Height', 'ultimate-store-kit'),
644 'type' => Controls_Manager::SLIDER,
645 'size_units' => ['px',],
646 'range' => [
647 'px' => [
648 'min' => 0,
649 'max' => 10,
650 'step' => 1,
651 ]
652 ],
653 'selectors' => [
654 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-item::before' => 'height: {{SIZE}}{{UNIT}};',
655 ],
656 ]
657 );
658 endif;
659
660 $this->end_controls_section();
661 }
662 protected function register_global_edd_controls_grid_image() {
663 $this->start_controls_section(
664 'section_style_image',
665 [
666 'label' => esc_html__('Image', 'ultimate-store-kit'),
667 'tab' => Controls_Manager::TAB_STYLE,
668 ]
669 );
670 $this->start_controls_tabs(
671 'style_tabs_image'
672 );
673 $this->start_controls_tab(
674 'image_normal',
675 [
676 'label' => esc_html__('Normal', 'ultimate-store-kit'),
677 ]
678 );
679 $this->add_group_control(
680 Group_Control_Background::get_type(),
681 [
682 'name' => 'image_background',
683 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-image',
684 ]
685 );
686 $this->add_group_control(
687 Group_Control_Border::get_type(),
688 [
689 'name' => 'image_border',
690 'label' => esc_html__('Image Border', 'ultimate-store-kit'),
691 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-image',
692 'separator' => 'before',
693 ]
694 );
695
696 $this->add_responsive_control(
697 'image_border_radius',
698 [
699 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
700 'type' => Controls_Manager::DIMENSIONS,
701 'size_units' => ['px', '%'],
702 'selectors' => [
703 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
704 ],
705 ]
706 );
707
708 $this->add_responsive_control(
709 'image_padding',
710 [
711 'label' => esc_html__('Padding', 'ultimate-store-kit'),
712 'type' => Controls_Manager::DIMENSIONS,
713 'size_units' => ['px', '%'],
714 'selectors' => [
715 '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-image' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
716 ],
717 ]
718 );
719
720 $this->add_group_control(
721 Group_Control_Box_Shadow::get_type(),
722 [
723 'name' => 'image_shadow',
724 'exclude' => [
725 'shadow_position',
726 ],
727 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .' . $this->get_name() . '-image',
728 ]
729 );
730 $this->end_controls_tab();
731 $this->start_controls_tab(
732 'image_hover',
733 [
734 'label' => esc_html__('Hover', 'ultimate-store-kit'),
735 ]
736 );
737 $this->add_group_control(
738 Group_Control_Background::get_type(),
739 [
740 'name' => 'image_hover_background',
741 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-item-box .usk-image',
742 ]
743 );
744 $this->add_group_control(
745 Group_Control_Border::get_type(),
746 [
747 'name' => 'image_hover_border',
748 'label' => esc_html__('Image Border', 'ultimate-store-kit'),
749 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-item-box .usk-image',
750 'separator' => 'before',
751 ]
752 );
753
754 $this->add_responsive_control(
755 'image_hover_border_radius',
756 [
757 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
758 'type' => Controls_Manager::DIMENSIONS,
759 'size_units' => ['px', '%'],
760 'selectors' => [
761 '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-item-box .usk-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
762 ],
763 ]
764 );
765
766 $this->add_group_control(
767 Group_Control_Box_Shadow::get_type(),
768 [
769 'name' => 'image_hover_shadow',
770 'exclude' => [
771 'shadow_position',
772 ],
773 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-item:hover .usk-item-box .usk-image',
774 ]
775 );
776 $this->end_controls_tab();
777 $this->end_controls_tabs();
778
779 $this->end_controls_section();
780 }
781
782 protected function register_global_edd_controls_content() {
783 $this->start_controls_section(
784 'section_style_content',
785 [
786 'label' => esc_html__('Content', 'ultimate-store-kit'),
787 'tab' => Controls_Manager::TAB_STYLE,
788 ]
789 );
790
791 $this->start_controls_tabs('tabs_content_style');
792
793 $this->start_controls_tab(
794 'tab_content_normal',
795 [
796 'label' => esc_html__('Normal', 'ultimate-store-kit'),
797 ]
798 );
799 $this->add_group_control(
800 Group_Control_Background::get_type(),
801 [
802 'name' => 'content_background',
803 'label' => esc_html__('Background', 'ultimate-store-kit'),
804 'types' => ['classic', 'gradient'],
805 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-content',
806 ]
807 );
808
809 $this->add_group_control(
810 Group_Control_Border::get_type(),
811 [
812 'name' => 'content_border',
813 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
814 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-content',
815 'separator' => 'before',
816 ]
817 );
818
819 $this->add_responsive_control(
820 'content_radius',
821 [
822 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
823 'type' => Controls_Manager::DIMENSIONS,
824 'size_units' => ['px', '%'],
825 'selectors' => [
826 '{{WRAPPER}} .' . $this->get_name() . ' .usk-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}; overflow: hidden;',
827 ],
828 ]
829 );
830
831 $this->add_responsive_control(
832 'content_padding',
833 [
834 'label' => esc_html__('Padding', 'ultimate-store-kit'),
835 'type' => Controls_Manager::DIMENSIONS,
836 'size_units' => ['px', 'em', '%'],
837 'selectors' => [
838 '{{WRAPPER}} .' . $this->get_name() . ' .usk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
839 ],
840 ]
841 );
842 $this->end_controls_tab();
843
844 $this->start_controls_tab(
845 'tab_content_hover',
846 [
847 'label' => esc_html__('Hover', 'ultimate-store-kit'),
848 ]
849 );
850 $this->add_group_control(
851 Group_Control_Background::get_type(),
852 [
853 'name' => 'content_hover_background',
854 'label' => esc_html__('Background', 'ultimate-store-kit'),
855 'types' => ['classic', 'gradient'],
856 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-content:hover',
857 ]
858 );
859 $this->add_control(
860 'content_hover_border_color',
861 [
862 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
863 'type' => Controls_Manager::COLOR,
864 'condition' => [
865 'item_border_border!' => '',
866 ],
867 'selectors' => [
868 '{{WRAPPER}} .' . $this->get_name() . ' .usk-content:hover' => 'border-color: {{VALUE}};',
869 ],
870 ]
871 );
872 $this->end_controls_tab();
873
874 $this->end_controls_tabs();
875
876 $this->end_controls_section();
877 }
878
879 protected function register_global_edd_style_controls_title() {
880 $this->start_controls_section(
881 'section_style_title',
882 [
883 'label' => esc_html__('Title', 'ultimate-store-kit'),
884 'tab' => Controls_Manager::TAB_STYLE,
885 'condition' => [
886 'show_title' => 'yes',
887 ],
888 ]
889 );
890
891 $this->add_control(
892 'title_color',
893 [
894 'label' => esc_html__('Color', 'ultimate-store-kit'),
895 'type' => Controls_Manager::COLOR,
896 'selectors' => [
897 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-title a' => 'color: {{VALUE}};',
898 ],
899 ]
900 );
901
902 $this->add_control(
903 'hover_title_color',
904 [
905 'label' => esc_html__('Hover Color', 'ultimate-store-kit'),
906 'type' => Controls_Manager::COLOR,
907 'selectors' => [
908 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-title a:hover' => 'color: {{VALUE}};',
909 ],
910 ]
911 );
912
913 $this->add_responsive_control(
914 'title_margin',
915 [
916 'label' => esc_html__('Margin', 'ultimate-store-kit'),
917 'type' => Controls_Manager::DIMENSIONS,
918 'size_units' => ['px', '%'],
919 'selectors' => [
920 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
921 ],
922 ]
923 );
924
925 $this->add_group_control(
926 Group_Control_Typography::get_type(),
927 [
928 'name' => 'title_typography',
929 'label' => esc_html__('Typography', 'ultimate-store-kit'),
930 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-title a',
931 ]
932 );
933
934 $this->end_controls_section();
935 }
936
937 protected function register_global_edd_style_controls_category() {
938 $this->start_controls_section(
939 'section_style_category',
940 [
941 'label' => esc_html__('Category', 'ultimate-store-kit'),
942 'tab' => Controls_Manager::TAB_STYLE,
943 'condition' => [
944 'show_category' => 'yes',
945 ],
946 ]
947 );
948 $this->start_controls_tabs(
949 'category_tabs'
950 );
951 $this->start_controls_tab(
952 'category_tab_normal',
953 [
954 'label' => esc_html__('Normal', 'ultimate-store-kit'),
955 ]
956 );
957 $this->add_control(
958 'category_color',
959 [
960 'label' => esc_html__('Color', 'ultimate-store-kit'),
961 'type' => Controls_Manager::COLOR,
962 'selectors' => [
963 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a' => 'color: {{VALUE}};',
964 ],
965 ]
966 );
967 $this->add_group_control(
968 Group_Control_Background::get_type(),
969 [
970 'name' => 'category_bg_color',
971 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a',
972 ]
973 );
974 $this->add_group_control(
975 Group_Control_Border::get_type(),
976 [
977 'name' => 'category_border',
978 'label' => __('Border', 'ultimate-store-kit'),
979 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a',
980 'separator' => 'before'
981 ]
982 );
983 $this->add_responsive_control(
984 'category_radius',
985 [
986 'label' => esc_html__('Border Radius', 'ultimate-store-kit'),
987 'type' => Controls_Manager::DIMENSIONS,
988 'size_units' => ['px', '%', 'em'],
989 'selectors' => [
990 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
991 ],
992 ]
993 );
994 $this->add_responsive_control(
995 'category_padding',
996 [
997 'label' => esc_html__('Padding', 'ultimate-store-kit'),
998 'type' => Controls_Manager::DIMENSIONS,
999 'size_units' => ['px', '%'],
1000 'selectors' => [
1001 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1002 ],
1003 ]
1004 );
1005 $this->add_responsive_control(
1006 'category_margin',
1007 [
1008 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1009 'type' => Controls_Manager::DIMENSIONS,
1010 'size_units' => ['px', '%'],
1011 'selectors' => [
1012 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1013 ],
1014 ]
1015 );
1016 $this->add_group_control(
1017 Group_Control_Typography::get_type(),
1018 [
1019 'name' => 'category_typography',
1020 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1021 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a',
1022 ]
1023 );
1024 $this->add_group_control(
1025 Group_Control_Box_Shadow::get_type(),
1026 [
1027 'name' => 'category_shadow',
1028 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a',
1029 ]
1030 );
1031 $this->end_controls_tab();
1032 $this->start_controls_tab(
1033 'category_tab_hover',
1034 [
1035 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1036 ]
1037 );
1038 $this->add_control(
1039 'hover_category_color',
1040 [
1041 'label' => esc_html__('Color', 'ultimate-store-kit'),
1042 'type' => Controls_Manager::COLOR,
1043 'selectors' => [
1044 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a:hover' => 'color: {{VALUE}};',
1045 ],
1046 ]
1047 );
1048 $this->add_group_control(
1049 Group_Control_Background::get_type(),
1050 [
1051 'name' => 'hover_category_bg_color',
1052 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a:hover',
1053 ]
1054 );
1055 $this->add_control(
1056 'hover_category_border_color',
1057 [
1058 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1059 'type' => Controls_Manager::COLOR,
1060 'selectors' => [
1061 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-category a:hover' => 'border-color: {{VALUE}};',
1062 ],
1063 'condition' => [
1064 'category_border_border!' => ''
1065 ],
1066 'separator' => 'before'
1067 ]
1068 );
1069 $this->end_controls_tab();
1070 $this->end_controls_tabs();
1071 $this->end_controls_section();
1072 }
1073 protected function register_global_edd_style_controls_action_button() {
1074 $this->start_controls_section(
1075 'style_action_btn',
1076 [
1077 'label' => esc_html__('Action Button', 'ultimate-store-kit'),
1078 'tab' => Controls_Manager::TAB_STYLE,
1079 ]
1080 );
1081
1082 $this->add_group_control(
1083 Group_Control_Border::get_type(),
1084 [
1085 'name' => 'action_btn_border',
1086 'label' => esc_html__('Border', 'ultimate-store-kit'),
1087 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button a, {{WRAPPER}} .' . $this->get_name() . ' .edd-add-to-cart',
1088 'separator' => 'before'
1089 ]
1090 );
1091 $this->add_responsive_control(
1092 'action_btn_radius',
1093 [
1094 'label' => esc_html__('Radius', 'ultimate-store-kit'),
1095 'type' => Controls_Manager::DIMENSIONS,
1096 'size_units' => ['px', '%', 'em'],
1097 'selectors' => [
1098 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button a, {{WRAPPER}} .' . $this->get_name() . ' .edd-add-to-cart' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1099 ],
1100 ]
1101 );
1102 $this->add_responsive_control(
1103 'action_btn_padding',
1104 [
1105 'label' => esc_html__('Padding', 'ultimate-store-kit'),
1106 'type' => Controls_Manager::DIMENSIONS,
1107 'size_units' => ['px', '%', 'em'],
1108 'selectors' => [
1109 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button a, {{WRAPPER}} .' . $this->get_name() . ' .edd-add-to-cart' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1110 ],
1111 ]
1112 );
1113 $this->add_responsive_control(
1114 'action_btn_margin',
1115 [
1116 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1117 'type' => Controls_Manager::DIMENSIONS,
1118 'size_units' => ['px', '%', 'em'],
1119 'selectors' => [
1120 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button a, {{WRAPPER}} .' . $this->get_name() . ' .edd-add-to-cart' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1121 ],
1122 ]
1123 );
1124 if (($this->get_name() == 'usk-edd-beauty-grid') || ($this->get_name() == 'usk-edd-beauty-carousel') || ($this->get_name() == 'usk-edd-standard-grid') || ($this->get_name() == 'usk-edd-standard-carousel')) :
1125 $this->add_responsive_control(
1126 'action_btn_space_between',
1127 [
1128 'label' => __('Space Between', 'ultimate-store-kit'),
1129 'type' => Controls_Manager::SLIDER,
1130 'size_units' => ['px'],
1131 'range' => [
1132 'px' => [
1133 'min' => 0,
1134 'max' => 50,
1135 'step' => 1,
1136 ]
1137 ],
1138 'selectors' => [
1139 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button' => 'gap: {{SIZE}}{{UNIT}};',
1140 ],
1141 ]
1142 );
1143 endif;
1144
1145 if (($this->get_name() == 'usk-edd-classic-grid') || ($this->get_name() == 'usk-edd-classic-carousel') || ($this->get_name() == 'usk-edd-trendy-grid') || ($this->get_name() == 'usk-edd-trendy-carousel')) :
1146 $this->add_responsive_control(
1147 'action_btn_space_between_classic_trendy',
1148 [
1149 'label' => __('Space Between', 'ultimate-store-kit'),
1150 'type' => Controls_Manager::SLIDER,
1151 'size_units' => ['px'],
1152 'range' => [
1153 'px' => [
1154 'min' => 0,
1155 'max' => 50,
1156 'step' => 1,
1157 ]
1158 ],
1159 'selectors' => [
1160 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button' => 'grid-row-gap: {{SIZE}}{{UNIT}};',
1161 ],
1162 ]
1163 );
1164 endif;
1165
1166 $this->add_group_control(
1167 Group_Control_Typography::get_type(),
1168 [
1169 'name' => 'action_btn_typography',
1170 'label' => __('Typography', 'ultimate-store-kit'),
1171 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button a, {{WRAPPER}} .' . $this->get_name() . ' .usk-action-button .edd-add-to-cart',
1172 ]
1173 );
1174
1175 $this->start_controls_tabs(
1176 'action_btn_tabs'
1177 );
1178 $this->start_controls_tab(
1179 'view_details_tab',
1180 [
1181 'label' => esc_html__('View Details', 'ultimate-store-kit'),
1182 ]
1183 );
1184 $this->add_control(
1185 'view_details_normal_color',
1186 [
1187 'label' => esc_html__('Color', 'ultimate-store-kit'),
1188 'type' => Controls_Manager::COLOR,
1189 'selectors' => [
1190 '{{WRAPPER}} .' . $this->get_name() . ' .usk-details-button a' => 'color: {{VALUE}}',
1191 ],
1192 ]
1193 );
1194 $this->add_group_control(
1195 Group_Control_Background::get_type(),
1196 [
1197 'name' => 'view_details_bg',
1198 'label' => __('Title', 'ultimate-store-kit'),
1199 'types' => ['classic', 'gradient'],
1200 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-details-button a',
1201 ]
1202 );
1203 $this->add_control(
1204 'heading_view_details_hover',
1205 [
1206 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1207 'type' => Controls_Manager::HEADING,
1208 'separator' => 'before',
1209 ]
1210 );
1211 $this->add_control(
1212 'view_details_hover_color',
1213 [
1214 'label' => esc_html__('Color', 'ultimate-store-kit'),
1215 'type' => Controls_Manager::COLOR,
1216 'selectors' => [
1217 '{{WRAPPER}} .' . $this->get_name() . ' .usk-details-button a:hover' => 'color: {{VALUE}}',
1218 ],
1219 ]
1220 );
1221 $this->add_group_control(
1222 Group_Control_Background::get_type(),
1223 [
1224 'name' => 'view_details_hover_bg',
1225 'label' => __('Title', 'ultimate-store-kit'),
1226 'types' => ['classic', 'gradient'],
1227 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-details-button a:hover',
1228 ]
1229 );
1230
1231 $this->add_control(
1232 'action_btn_hover_border_color',
1233 [
1234 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1235 'type' => Controls_Manager::COLOR,
1236 'selectors' => [
1237 '{{WRAPPER}} .' . $this->get_name() . ' .usk-details-button a:hover' => 'border-color: {{VALUE}};',
1238 ],
1239 'condition' => [
1240 'action_btn_border_border!' => '',
1241 ],
1242 ]
1243 );
1244
1245 $this->end_controls_tab();
1246 $this->start_controls_tab(
1247 'purchase_btn_tab',
1248 [
1249 'label' => esc_html__('Purchase', 'ultimate-store-kit'),
1250 ]
1251 );
1252 $this->add_control(
1253 'purchase_btn_normal_color',
1254 [
1255 'label' => esc_html__('Color', 'ultimate-store-kit'),
1256 'type' => Controls_Manager::COLOR,
1257 'selectors' => [
1258 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button .blue' => 'color: {{VALUE}}',
1259 ],
1260 ]
1261 );
1262 $this->add_group_control(
1263 Group_Control_Background::get_type(),
1264 [
1265 'name' => 'purchase_btn_bg',
1266 'label' => __('Title', 'ultimate-store-kit'),
1267 'types' => ['classic', 'gradient'],
1268 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button .blue',
1269 ]
1270 );
1271 $this->add_control(
1272 'heading_purchase_btn_hover',
1273 [
1274 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1275 'type' => Controls_Manager::HEADING,
1276 'separator' => 'before',
1277 ]
1278 );
1279 $this->add_control(
1280 'purchase_btn_hover_color',
1281 [
1282 'label' => esc_html__('Color', 'ultimate-store-kit'),
1283 'type' => Controls_Manager::COLOR,
1284 'selectors' => [
1285 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button .blue:hover' => 'color: {{VALUE}}',
1286 ],
1287 ]
1288 );
1289 $this->add_group_control(
1290 Group_Control_Background::get_type(),
1291 [
1292 'name' => 'purchase_btn_hover_bg',
1293 'label' => __('Title', 'ultimate-store-kit'),
1294 'types' => ['classic', 'gradient'],
1295 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button .blue:hover',
1296 ]
1297 );
1298
1299 $this->add_control(
1300 'action_btn_purchase_border_color',
1301 [
1302 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1303 'type' => Controls_Manager::COLOR,
1304 'selectors' => [
1305 '{{WRAPPER}} .' . $this->get_name() . ' .usk-action-button .blue:hover' => 'border-color: {{VALUE}};',
1306 ],
1307 'condition' => [
1308 'action_btn_border_border!' => ''
1309 ],
1310 ]
1311 );
1312
1313 $this->end_controls_tab();
1314 $this->end_controls_tabs();
1315 $this->end_controls_section();
1316 }
1317
1318 protected function register_global_edd_style_controls_price() {
1319 $this->start_controls_section(
1320 'section_style_price',
1321 [
1322 'label' => esc_html__('Price', 'ultimate-store-kit'),
1323 'tab' => Controls_Manager::TAB_STYLE,
1324 'condition' => [
1325 'show_price' => 'yes',
1326 ],
1327 ]
1328 );
1329
1330 $this->add_control(
1331 'price_color',
1332 [
1333 'label' => esc_html__('Color', 'ultimate-store-kit'),
1334 'type' => Controls_Manager::COLOR,
1335 'selectors' => [
1336 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-price' => 'color: {{VALUE}};',
1337 ],
1338 ]
1339 );
1340
1341 $this->add_responsive_control(
1342 'price_margin',
1343 [
1344 'label' => esc_html__('Margin', 'ultimate-store-kit'),
1345 'type' => Controls_Manager::DIMENSIONS,
1346 'size_units' => ['px', '%'],
1347 'selectors' => [
1348 '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-price' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1349 ],
1350 ]
1351 );
1352
1353 $this->add_group_control(
1354 Group_Control_Typography::get_type(),
1355 [
1356 'name' => 'price_typography',
1357 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1358 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-edd-price',
1359 ]
1360 );
1361 $this->end_controls_section();
1362 }
1363 protected function register_global_edd_controls_grid_pagination() {
1364 $this->start_controls_section(
1365 'section_style_pagination',
1366 [
1367 'label' => esc_html__('Pagination', 'ultimate-store-kit'),
1368 'tab' => Controls_Manager::TAB_STYLE,
1369 'condition' => [
1370 'show_pagination' => 'yes',
1371 ],
1372 ]
1373 );
1374 $this->start_controls_tabs(
1375 'pagination_normal'
1376 );
1377 $this->start_controls_tab(
1378 'pagination_tab_normal',
1379 [
1380 'label' => esc_html__('Normal', 'ultimate-store-kit'),
1381 ]
1382 );
1383 $this->add_control(
1384 'pagination_color',
1385 [
1386 'label' => esc_html__('Color', 'ultimate-store-kit'),
1387 'type' => Controls_Manager::COLOR,
1388 'selectors' => [
1389 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li:not(.usk-active) a' => 'color: {{VALUE}};',
1390 ],
1391 ]
1392 );
1393 $this->add_control(
1394 'pagination_background',
1395 [
1396 'label' => esc_html__('Background', 'ultimate-store-kit'),
1397 'type' => Controls_Manager::COLOR,
1398 'selectors' => [
1399 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li:not(.usk-active) a' => 'background-color: {{VALUE}};',
1400 ],
1401 ]
1402 );
1403 $this->add_group_control(
1404 Group_Control_Border::get_type(),
1405 [
1406 'name' => 'pagination_border',
1407 'label' => esc_html__('Border', 'ultimate-store-kit'),
1408 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li:not(.usk-active) a',
1409 'separator' => 'before'
1410 ]
1411 );
1412 $this->add_control(
1413 'pagination_alignment',
1414 [
1415 'label' => esc_html__('Alignment', 'ultimate-store-kit'),
1416 'type' => Controls_Manager::CHOOSE,
1417 'options' => [
1418 'flex-start' => [
1419 'title' => esc_html__('Left', 'ultimate-store-kit'),
1420 'icon' => 'eicon-h-align-left',
1421 ],
1422 'center' => [
1423 'title' => esc_html__('Center', 'ultimate-store-kit'),
1424 'icon' => 'eicon-h-align-center',
1425 ],
1426 'flex-end' => [
1427 'title' => esc_html__('Right', 'ultimate-store-kit'),
1428 'icon' => 'eicon-h-align-right',
1429 ],
1430 ],
1431 'default' => 'flex-start',
1432 'toggle' => false,
1433 'selectors' => [
1434 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination' => 'justify-content: {{VALUE}};',
1435 ],
1436 'separator' => 'before',
1437 ]
1438 );
1439 $this->add_responsive_control(
1440 'pagination_padding',
1441 [
1442 'label' => __('Padding', 'ultimate-store-kit'),
1443 'type' => Controls_Manager::DIMENSIONS,
1444 'size_units' => ['px', '%', 'em'],
1445 'selectors' => [
1446 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1447 ],
1448 ]
1449 );
1450 $this->add_responsive_control(
1451 'pagination_radius',
1452 [
1453 'label' => __('Border Radius', 'ultimate-store-kit'),
1454 'type' => Controls_Manager::DIMENSIONS,
1455 'size_units' => ['px', '%', 'em'],
1456 'selectors' => [
1457 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1458 ],
1459 ]
1460 );
1461 $this->add_responsive_control(
1462 'pagination_spacing_top',
1463 [
1464 'label' => esc_html__('Top Spacing', 'ultimate-store-kit'),
1465 'type' => Controls_Manager::SLIDER,
1466 'selectors' => [
1467 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination' => 'margin-top: {{SIZE}}px;',
1468 ],
1469 ]
1470 );
1471 $this->add_responsive_control(
1472 'pagination_spacing',
1473 [
1474 'label' => esc_html__('Space Between', 'ultimate-store-kit'),
1475 'type' => Controls_Manager::SLIDER,
1476 'default' => [
1477 'unit' => 'px',
1478 'size' => 5,
1479 ],
1480 'selectors' => [
1481 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li' => 'margin-right: {{SIZE}}{{UNIT}};',
1482 ],
1483 ]
1484 );
1485
1486 $this->add_group_control(
1487 Group_Control_Typography::get_type(),
1488 [
1489 'name' => 'pagination_typography',
1490 'label' => esc_html__('Typography', 'ultimate-store-kit'),
1491 'selector' => '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a, {{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a li span',
1492 // 'exclude' => ['letter_spacing', 'text_decoration', 'text_transform', 'font_size', 'line_height'],
1493 ]
1494 );
1495
1496 $this->end_controls_tab();
1497 $this->start_controls_tab(
1498 'pagination_tab_hover',
1499 [
1500 'label' => esc_html__('Hover', 'ultimate-store-kit'),
1501 ]
1502 );
1503 $this->add_control(
1504 'hover_pagination_color',
1505 [
1506 'label' => esc_html__('Color', 'ultimate-store-kit'),
1507 'type' => Controls_Manager::COLOR,
1508 'selectors' => [
1509 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a:hover' => 'color: {{VALUE}};',
1510 ],
1511 ]
1512 );
1513 $this->add_control(
1514 'hover_pagination_background',
1515 [
1516 'label' => esc_html__('Background', 'ultimate-store-kit'),
1517 'type' => Controls_Manager::COLOR,
1518 'selectors' => [
1519 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a:hover' => 'background:{{VALUE}};',
1520 ],
1521 ]
1522 );
1523 $this->add_control(
1524 'hover_pagination_border_color',
1525 [
1526 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1527 'type' => Controls_Manager::COLOR,
1528 'selectors' => [
1529 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li a:hover' => 'border-color:{{VALUE}};',
1530 ],
1531 'condition' => [
1532 'pagination_border_border!' => ['none', ''],
1533 ]
1534 ]
1535 );
1536
1537 $this->end_controls_tab();
1538 $this->start_controls_tab(
1539 'pagination_tab_active',
1540 [
1541 'label' => esc_html__('Active', 'ultimate-store-kit'),
1542 ]
1543 );
1544 $this->add_control(
1545 'active_pagination_color',
1546 [
1547 'label' => esc_html__('Color', 'ultimate-store-kit'),
1548 'type' => Controls_Manager::COLOR,
1549 'selectors' => [
1550 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li.usk-active a' => 'color: {{VALUE}};',
1551 ],
1552 ]
1553 );
1554 $this->add_control(
1555 'active_pagination_background',
1556 [
1557 'label' => esc_html__('Background', 'ultimate-store-kit'),
1558 'type' => Controls_Manager::COLOR,
1559 'selectors' => [
1560 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li.usk-active a' => 'background:{{VALUE}};',
1561 ],
1562 ]
1563 );
1564 $this->add_control(
1565 'active_pagination_border_color',
1566 [
1567 'label' => esc_html__('Border Color', 'ultimate-store-kit'),
1568 'type' => Controls_Manager::COLOR,
1569 'selectors' => [
1570 '{{WRAPPER}} .' . $this->get_name() . ' .usk-pagination li.usk-active a' => 'border-color: {{VALUE}};',
1571 ],
1572 'condition' => [
1573 'pagination_border_border!' => ['none', ''],
1574 ]
1575 ]
1576 );
1577 $this->end_controls_tab();
1578 $this->end_controls_tabs();
1579 $this->end_controls_section();
1580 }
1581 }
1582