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