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

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

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