PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.1.4
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.1.4
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
ultimate-store-kit / traits / global-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.1.4, at traits/global-edd-widget-controls.php

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