PluginProbe
Ultimate Store Kit / 3.1.0
Ultimate Store Kit v3.1.0
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 2.0.6 All 92 releases
ultimate-store-kit / includes / Admin / ModuleService.php

ModuleService.php in Ultimate Store Kit 3.1.0, at includes/Admin/ModuleService.php

1,105 lines 55.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UltimateStoreKit\Admin;
4
5
6
7 if (!defined('ABSPATH')) {
8 exit;
9 } // Exit if accessed directly
10
11 if (!function_exists('is_plugin_active')) {
12 include_once(ABSPATH . 'wp-admin/includes/plugin.php');
13 }
14
15 class ModuleService {
16
17
18
19 public static function get_widget_settings($callable) {
20 $settings_fields = [
21 'ultimate_store_kit_active_modules' => [
22
23 [
24 'name' => 'add-to-cart',
25 'label' => esc_html__('Add to Cart (Single)', 'ultimate-store-kit'),
26 'type' => 'checkbox',
27 'default' => "on",
28 'plugin_name' => 'woocommerce',
29 'plugin_path' => 'woocommerce/woocommerce.php',
30 'widget_type' => 'pro',
31 'content_type' => 'woocommerce single',
32 'demo_url' => 'https://storekit.pro/demo/add-to-cart/',
33 'video_url' => '',
34 ],
35 [
36 'name' => 'additional-information',
37 'label' => esc_html__('Additional Information (Single)', 'ultimate-store-kit'),
38 'type' => 'checkbox',
39 'default' => "on",
40 'plugin_name' => 'woocommerce',
41 'plugin_path' => 'woocommerce/woocommerce.php',
42 'widget_type' => 'pro',
43 'content_type' => 'woocommerce single',
44 'demo_url' => 'https://storekit.pro/demo/additional-information/',
45 'video_url' => '',
46 ],
47 [
48 'name' => 'account-address',
49 'label' => esc_html__('Account Address', 'ultimate-store-kit'),
50 'type' => 'checkbox',
51 'default' => "off",
52 'widget_type' => 'pro',
53 'plugin_name' => 'woocommerce',
54 'plugin_path' => 'woocommerce/woocommerce.php',
55 'content_type' => 'woocommerce account',
56 'demo_url' => 'https://storekit.pro/demo/account-address/',
57 'video_url' => '',
58 ],
59 [
60 'name' => 'account-dashboard',
61 'label' => esc_html__('Account Dashboard', 'ultimate-store-kit'),
62 'type' => 'checkbox',
63 'default' => "off",
64 'widget_type' => 'pro',
65 'plugin_name' => 'woocommerce',
66 'plugin_path' => 'woocommerce/woocommerce.php',
67 'content_type' => 'woocommerce account',
68 'demo_url' => 'https://storekit.pro/demo/account-dashboard/',
69 'video_url' => '',
70 ],
71 [
72 'name' => 'account-details',
73 'label' => esc_html__('Account Details', 'ultimate-store-kit'),
74 'type' => 'checkbox',
75 'default' => "off",
76 'widget_type' => 'pro',
77 'plugin_name' => 'woocommerce',
78 'plugin_path' => 'woocommerce/woocommerce.php',
79 'content_type' => 'woocommerce account',
80 'demo_url' => 'https://storekit.pro/demo/account-details/',
81 'video_url' => '',
82 ],
83 [
84 'name' => 'account-downloads',
85 'label' => esc_html__('Account Download', 'ultimate-store-kit'),
86 'type' => 'checkbox',
87 'default' => "off",
88 'widget_type' => 'pro',
89 'plugin_name' => 'woocommerce',
90 'plugin_path' => 'woocommerce/woocommerce.php',
91 'content_type' => 'woocommerce account',
92 'demo_url' => 'https://storekit.pro/demo/account-downloads/',
93 'video_url' => '',
94 ],
95 [
96 'name' => 'account-login-form',
97 'label' => esc_html__('Account Login Form', 'ultimate-store-kit'),
98 'type' => 'checkbox',
99 'default' => "off",
100 'widget_type' => 'pro',
101 'plugin_name' => 'woocommerce',
102 'plugin_path' => 'woocommerce/woocommerce.php',
103 'content_type' => 'woocommerce account',
104 'demo_url' => 'https://storekit.pro/demo/account-login-form/',
105 'video_url' => '',
106 ],
107 [
108 'name' => 'account-logout',
109 'label' => esc_html__('Account Logout', 'ultimate-store-kit'),
110 'type' => 'checkbox',
111 'default' => "off",
112 'widget_type' => 'pro',
113 'plugin_name' => 'woocommerce',
114 'plugin_path' => 'woocommerce/woocommerce.php',
115 'content_type' => 'woocommerce account',
116 'demo_url' => 'https://storekit.pro/demo/account-logout/',
117 'video_url' => '',
118 ],
119 [
120 'name' => 'account-navigation',
121 'label' => esc_html__('Account Navigation', 'ultimate-store-kit'),
122 'type' => 'checkbox',
123 'default' => "off",
124 'widget_type' => 'pro',
125 'plugin_name' => 'woocommerce',
126 'plugin_path' => 'woocommerce/woocommerce.php',
127 'content_type' => 'woocommerce account',
128 'demo_url' => 'https://storekit.pro/demo/account-navigation/',
129 'video_url' => '',
130 ],
131 [
132 'name' => 'account-order-details',
133 'label' => esc_html__('Account Order Details', 'ultimate-store-kit'),
134 'type' => 'checkbox',
135 'default' => "off",
136 'widget_type' => 'pro',
137 'plugin_name' => 'woocommerce',
138 'plugin_path' => 'woocommerce/woocommerce.php',
139 'content_type' => 'woocommerce account',
140 'demo_url' => 'https://storekit.pro/demo/account-order-details/',
141 'video_url' => '',
142 ],
143 [
144 'name' => 'account-orders',
145 'label' => esc_html__('Account Orders', 'ultimate-store-kit'),
146 'type' => 'checkbox',
147 'default' => "off",
148 'widget_type' => 'pro',
149 'plugin_name' => 'woocommerce',
150 'plugin_path' => 'woocommerce/woocommerce.php',
151 'content_type' => 'woocommerce account',
152 'demo_url' => 'https://storekit.pro/demo/account-orders/',
153 'video_url' => '',
154 ],
155 [
156 'name' => 'account-registration-form',
157 'label' => esc_html__('Account Registration Form', 'ultimate-store-kit'),
158 'type' => 'checkbox',
159 'default' => "off",
160 'widget_type' => 'pro',
161 'plugin_name' => 'woocommerce',
162 'plugin_path' => 'woocommerce/woocommerce.php',
163 'content_type' => 'woocommerce account',
164 'demo_url' => 'https://storekit.pro/demo/account-registration-form/',
165 'video_url' => '',
166 ],
167 [
168 'name' => 'breadcrumbs',
169 'label' => esc_html__('Breadcrumbs (Single)', 'ultimate-store-kit'),
170 'type' => 'checkbox',
171 'default' => "on",
172 'widget_type' => 'pro',
173 'plugin_name' => 'woocommerce',
174 'plugin_path' => 'woocommerce/woocommerce.php',
175 'content_type' => 'single',
176 'demo_url' => 'https://storekit.pro/demo/breadcrumbs/',
177 'video_url' => '',
178 ],
179 [
180 'name' => 'call-for-price',
181 'label' => esc_html__('Call for Price (Single)', 'ultimate-store-kit'),
182 'type' => 'checkbox',
183 'default' => "off",
184 'plugin_name' => 'woocommerce',
185 'plugin_path' => 'woocommerce/woocommerce.php',
186 'widget_type' => 'pro',
187 'content_type' => 'woocommerce single',
188 'demo_url' => '#https://storekit.pro/demo/call-for-price/',
189 'video_url' => '',
190 ],
191 // CHECKOUT
192 [
193 'name' => 'checkout-additional-info',
194 'label' => esc_html__('Checkout Additional Info', 'ultimate-store-kit'),
195 'type' => 'checkbox',
196 'default' => "off",
197 'widget_type' => 'pro',
198 'plugin_name' => 'woocommerce',
199 'plugin_path' => 'woocommerce/woocommerce.php',
200 'content_type' => 'checkout',
201 'demo_url' => 'https://storekit.pro/demo/checkout-additional-info/',
202 'video_url' => '',
203 ],
204 [
205 'name' => 'checkout-billing-address',
206 'label' => esc_html__('Checkout Billing Address', 'ultimate-store-kit'),
207 'type' => 'checkbox',
208 'default' => "off",
209 'widget_type' => 'pro',
210 'plugin_name' => 'woocommerce',
211 'plugin_path' => 'woocommerce/woocommerce.php',
212 'content_type' => 'checkout',
213 'demo_url' => 'https://storekit.pro/demo/checkout-billing-address/',
214 'video_url' => '',
215 ],
216 [
217 'name' => 'checkout-coupon-form',
218 'label' => esc_html__('Checkout Coupon Form', 'ultimate-store-kit'),
219 'type' => 'checkbox',
220 'default' => "off",
221 'widget_type' => 'pro',
222 'plugin_name' => 'woocommerce',
223 'plugin_path' => 'woocommerce/woocommerce.php',
224 'content_type' => 'checkout',
225 'demo_url' => 'https://storekit.pro/demo/checkout-coupon-form/',
226 'video_url' => '',
227 ],
228 [
229 'name' => 'checkout-login-form',
230 'label' => esc_html__('Checkout Login Form', 'ultimate-store-kit'),
231 'type' => 'checkbox',
232 'default' => "off",
233 'widget_type' => 'pro',
234 'plugin_name' => 'woocommerce',
235 'plugin_path' => 'woocommerce/woocommerce.php',
236 'content_type' => 'checkout',
237 'demo_url' => 'https://storekit.pro/demo/checkout-login-form/',
238 'video_url' => '',
239 ],
240 [
241 'name' => 'checkout-order-review',
242 'label' => esc_html__('Checkout Order Review', 'ultimate-store-kit'),
243 'type' => 'checkbox',
244 'default' => "off",
245 'widget_type' => 'pro',
246 'plugin_name' => 'woocommerce',
247 'plugin_path' => 'woocommerce/woocommerce.php',
248 'content_type' => 'checkout',
249 'demo_url' => 'https://storekit.pro/demo/checkout-order-review/',
250 'video_url' => '',
251 ],
252 [
253 'name' => 'checkout-payment',
254 'label' => esc_html__('Checkout Payment', 'ultimate-store-kit'),
255 'type' => 'checkbox',
256 'default' => "off",
257 'widget_type' => 'pro',
258 'plugin_name' => 'woocommerce',
259 'plugin_path' => 'woocommerce/woocommerce.php',
260 'content_type' => 'checkout',
261 'demo_url' => 'https://storekit.pro/demo/checkout-payment/',
262 'video_url' => '',
263 ],
264 [
265 'name' => 'checkout-shipping-methods',
266 'label' => esc_html__('Checkout Shipping Methods', 'ultimate-store-kit'),
267 'type' => 'checkbox',
268 'default' => "off",
269 'widget_type' => 'pro',
270 'plugin_name' => 'woocommerce',
271 'plugin_path' => 'woocommerce/woocommerce.php',
272 'content_type' => 'checkout',
273 'demo_url' => 'https://storekit.pro/demo/checkout-shipping-methods/',
274 'video_url' => '',
275 ],
276 [
277 'name' => 'checkout-shipping-form',
278 'label' => esc_html__('Checkout Shipping Form', 'ultimate-store-kit'),
279 'type' => 'checkbox',
280 'default' => "off",
281 'widget_type' => 'pro',
282 'plugin_name' => 'woocommerce',
283 'plugin_path' => 'woocommerce/woocommerce.php',
284 'content_type' => 'checkout',
285 'demo_url' => 'https://storekit.pro/demo/checkout-shipping-form/',
286 'video_url' => '',
287 ],
288 [
289 'name' => 'compare-button',
290 'label' => esc_html__('Compare Button', 'ultimate-store-kit'),
291 'type' => 'checkbox',
292 'default' => "off",
293 'widget_type' => 'pro',
294 'plugin_name' => 'woocommerce',
295 'plugin_path' => 'woocommerce/woocommerce.php',
296 'content_type' => 'others',
297 'demo_url' => 'https://storekit.pro/demo/compare-button/',
298 'video_url' => '',
299 ],
300 [
301 'name' => 'compare-products',
302 'label' => esc_html__('Compare Products', 'ultimate-store-kit'),
303 'type' => 'checkbox',
304 'default' => "off",
305 'widget_type' => 'pro',
306 'plugin_name' => 'woocommerce',
307 'plugin_path' => 'woocommerce/woocommerce.php',
308 'content_type' => 'others',
309 'demo_url' => 'https://storekit.pro/demo/compare-products/',
310 'video_url' => '',
311 ],
312
313 [
314 'name' => 'florence-grid',
315 'label' => esc_html__('Florence Grid', 'ultimate-store-kit'),
316 'type' => 'checkbox',
317 'default' => "on",
318 'widget_type' => 'free',
319 'plugin_name' => 'woocommerce',
320 'plugin_path' => 'woocommerce/woocommerce.php',
321 'content_type' => 'woocommerce grid',
322 'demo_url' => 'https://storekit.pro/demo/florence-grid/',
323 'video_url' => 'https://youtu.be/5UDpy3MqFbU',
324 ],
325 [
326 'name' => 'florence-carousel',
327 'label' => esc_html__('Florence Carousel', 'ultimate-store-kit'),
328 'type' => 'checkbox',
329 'default' => "on",
330 'widget_type' => 'free',
331 'plugin_name' => 'woocommerce',
332 'plugin_path' => 'woocommerce/woocommerce.php',
333 'content_type' => 'woocommerce carousel',
334 'demo_url' => 'https://storekit.pro/demo/florence-carousel/',
335 'video_url' => 'https://youtu.be/eqAsEwqcKdM',
336 ],
337 [
338 'name' => 'glossy-grid',
339 'label' => esc_html__('Glossy Grid', 'ultimate-store-kit'),
340 'type' => 'checkbox',
341 'default' => "on",
342 'widget_type' => 'free',
343 'plugin_name' => 'woocommerce',
344 'plugin_path' => 'woocommerce/woocommerce.php',
345 'content_type' => 'woocommerce grid',
346 'demo_url' => 'https://storekit.pro/demo/glossy-grid/',
347 'video_url' => 'https://youtu.be/H-EwEpbeXFA',
348 ],
349 [
350 'name' => 'glossy-carousel',
351 'label' => esc_html__('Glossy Carousel', 'ultimate-store-kit'),
352 'type' => 'checkbox',
353 'default' => "on",
354 'widget_type' => 'free',
355 'plugin_name' => 'woocommerce',
356 'plugin_path' => 'woocommerce/woocommerce.php',
357 'content_type' => 'woocommerce carousel',
358 'demo_url' => 'https://storekit.pro/demo/glossy-carousel/',
359 'video_url' => 'https://youtu.be/P9proLYapgQ',
360 ],
361 [
362 'name' => 'heaven-slider',
363 'label' => esc_html__('Heaven Slider', 'ultimate-store-kit'),
364 'type' => 'checkbox',
365 'default' => "on",
366 'widget_type' => 'free',
367 'plugin_name' => 'woocommerce',
368 'plugin_path' => 'woocommerce/woocommerce.php',
369 'content_type' => 'woocommerce slider',
370 'demo_url' => 'https://storekit.pro/demo/heaven-slider/',
371 'video_url' => '',
372 ],
373 [
374 'name' => 'image-hotspot',
375 'label' => esc_html__('Image Hotspot', 'ultimate-store-kit'),
376 'type' => 'checkbox',
377 'default' => "off",
378 'plugin_name' => 'woocommerce',
379 'plugin_path' => 'woocommerce/woocommerce.php',
380 'widget_type' => 'free',
381 'content_type' => 'woocommerce new',
382 'demo_url' => 'https://storekit.pro/demo/image-hotspot/',
383 'video_url' => 'https://youtu.be/7vrY1aY5mMw',
384 ],
385 [
386 'name' => 'info-list',
387 'label' => esc_html__('Info List', 'ultimate-store-kit'),
388 'type' => 'checkbox',
389 'default' => "on",
390 'widget_type' => 'free',
391 'plugin_name' => 'woocommerce',
392 'plugin_path' => 'woocommerce/woocommerce.php',
393 'content_type' => 'others',
394 'demo_url' => 'https://storekit.pro/demo/info-list/',
395 'video_url' => 'https://youtu.be/vVCYUAPuqcg?si=ld1BjZ6KIy3OU62Y',
396 ],
397
398 [
399 'name' => 'mentor-slider',
400 'label' => esc_html__('Mentor Slider', 'ultimate-store-kit'),
401 'type' => 'checkbox',
402 'default' => "on",
403 'widget_type' => 'free',
404 'plugin_name' => 'woocommerce',
405 'plugin_path' => 'woocommerce/woocommerce.php',
406 'content_type' => 'woocommerce slider',
407 'demo_url' => 'https://storekit.pro/demo/mentor-slider/',
408 'video_url' => 'https://youtu.be/qO4BSo8OTkA',
409 ],
410 [
411 'name' => 'mini-cart',
412 'label' => esc_html__('Mini Cart', 'ultimate-store-kit'),
413 'type' => 'checkbox',
414 'default' => "on",
415 'widget_type' => 'free',
416 'plugin_name' => 'woocommerce',
417 'plugin_path' => 'woocommerce/woocommerce.php',
418 'content_type' => 'woocommerce others',
419 'demo_url' => 'https://storekit.pro/demo/mini-cart/',
420 'video_url' => '',
421 ],
422 [
423 'name' => 'page-cart',
424 'label' => esc_html__('Cart (Page)', 'ultimate-store-kit'),
425 'type' => 'checkbox',
426 'default' => "off",
427 'widget_type' => 'free',
428 'plugin_name' => 'woocommerce',
429 'plugin_path' => 'woocommerce/woocommerce.php',
430 'content_type' => 'woocommerce cart',
431 'demo_url' => 'https://storekit.pro/demo/page-cart/',
432 'video_url' => '',
433 ],
434 [
435 'name' => 'page-checkout',
436 'label' => esc_html__('Checkout (Page)', 'ultimate-store-kit'),
437 'type' => 'checkbox',
438 'default' => "off",
439 'widget_type' => 'free',
440 'plugin_name' => 'woocommerce',
441 'plugin_path' => 'woocommerce/woocommerce.php',
442 'content_type' => 'woocommerce checkout',
443 'demo_url' => 'https://storekit.pro/demo/page-checkout/',
444 'video_url' => '',
445 ],
446
447 [
448 'name' => 'page-my-account',
449 'label' => esc_html__('My Account (Page)', 'ultimate-store-kit'),
450 'type' => 'checkbox',
451 'default' => "off",
452 'widget_type' => 'pro',
453 'plugin_name' => 'woocommerce',
454 'plugin_path' => 'woocommerce/woocommerce.php',
455 'content_type' => 'woocommerce account',
456 'demo_url' => 'https://storekit.pro/demo/page-my-account/',
457 'video_url' => '',
458 ],
459 [
460 'name' => 'page-order',
461 'label' => esc_html__('Order (Page)', 'ultimate-store-kit'),
462 'type' => 'checkbox',
463 'default' => "off",
464 'widget_type' => 'free',
465 'plugin_name' => 'woocommerce',
466 'plugin_path' => 'woocommerce/woocommerce.php',
467 'content_type' => 'woocommerce order thank-you',
468 'demo_url' => 'https://storekit.pro/demo/page-order/',
469 'video_url' => '',
470 ],
471 [
472 'name' => 'page-single',
473 'label' => esc_html__('Single Product (Page)', 'ultimate-store-kit'),
474 'type' => 'checkbox',
475 'default' => "off",
476 'widget_type' => 'free',
477 'plugin_name' => 'woocommerce',
478 'plugin_path' => 'woocommerce/woocommerce.php',
479 'content_type' => 'woocommerce single',
480 'demo_url' => 'https://storekit.pro/demo/page-single/',
481 'video_url' => '',
482 ],
483 [
484 'name' => 'product-accordion',
485 'label' => esc_html__('Product Accordion', 'ultimate-store-kit'),
486 'type' => 'checkbox',
487 'default' => "on",
488 'widget_type' => 'free',
489 'plugin_name' => 'woocommerce',
490 'plugin_path' => 'woocommerce/woocommerce.php',
491 'content_type' => 'woocommerce others',
492 'demo_url' => 'https://storekit.pro/demo/product-accordion/',
493 'video_url' => 'https://youtu.be/uWSRAnKjEEU?si=VAxAf_aryJYvmqbQ',
494 ],
495 [
496 'name' => 'product-category',
497 'label' => esc_html__('Product Category', 'ultimate-store-kit'),
498 'type' => 'checkbox',
499 'default' => "on",
500 'widget_type' => 'free',
501 'plugin_name' => 'woocommerce',
502 'plugin_path' => 'woocommerce/woocommerce.php',
503 'content_type' => 'woocommerce others',
504 'demo_url' => 'https://storekit.pro/demo/product-category/',
505 'video_url' => '',
506 ],
507 [
508 'name' => 'product-category-carousel',
509 'label' => esc_html__('Product Category Carousel', 'ultimate-store-kit'),
510 'type' => 'checkbox',
511 'default' => "on",
512 'widget_type' => 'free',
513 'plugin_name' => 'woocommerce',
514 'plugin_path' => 'woocommerce/woocommerce.php',
515 'content_type' => 'woocommerce others',
516 'demo_url' => 'https://storekit.pro/demo/product-category-carousel/',
517 'video_url' => '',
518 ],
519 [
520 'name' => 'product-description',
521 'label' => esc_html__('Short Description (Single)', 'ultimate-store-kit'),
522 'type' => 'checkbox',
523 'default' => "on",
524 'widget_type' => 'free',
525 'plugin_name' => 'woocommerce',
526 'plugin_path' => 'woocommerce/woocommerce.php',
527 'content_type' => 'woocommerce',
528 'demo_url' => 'https://storekit.pro/demo/product-description/',
529 'video_url' => '',
530 ],
531 [
532 'name' => 'product-filters',
533 'label' => esc_html__('Product Filters', 'ultimate-store-kit'),
534 'type' => 'checkbox',
535 'default' => "on",
536 'widget_type' => 'pro',
537 'plugin_name' => 'woocommerce',
538 'plugin_path' => 'woocommerce/woocommerce.php',
539 'content_type' => 'woocommerce others new',
540 'demo_url' => 'https://storekit.pro/demo/product-filters/',
541 'video_url' => '',
542 ],
543 [
544 'name' => 'product-image',
545 'label' => esc_html__('Product Image (Single)', 'ultimate-store-kit'),
546 'type' => 'checkbox',
547 'default' => "off",
548 'widget_type' => 'pro',
549 'plugin_name' => 'woocommerce',
550 'plugin_path' => 'woocommerce/woocommerce.php',
551 'content_type' => 'woocommerce single',
552 'demo_url' => 'https://storekit.pro/demo/product-image/',
553 'video_url' => '',
554 ],
555 [
556 'name' => 'product-image-accordion',
557 'label' => esc_html__('Product Image Accordion', 'ultimate-store-kit'),
558 'type' => 'checkbox',
559 'default' => "on",
560 'widget_type' => 'free',
561 'plugin_name' => 'woocommerce',
562 'plugin_path' => 'woocommerce/woocommerce.php',
563 'content_type' => 'woocommerce others',
564 'demo_url' => 'https://storekit.pro/demo/product-image-accordion/',
565 'video_url' => '',
566 ],
567 [
568 'name' => 'product-list',
569 'label' => esc_html__('Product List', 'ultimate-store-kit'),
570 'type' => 'checkbox',
571 'default' => "on",
572 'widget_type' => 'free',
573 'plugin_name' => 'woocommerce',
574 'plugin_path' => 'woocommerce/woocommerce.php',
575 'content_type' => 'woocommerce others',
576 'demo_url' => 'https://storekit.pro/demo/product-list/',
577 'video_url' => 'https://youtu.be/qJQ9wfdoMKg',
578 ],
579 [
580 'name' => 'product-meta',
581 'label' => esc_html__('Product Meta (Single)', 'ultimate-store-kit'),
582 'type' => 'checkbox',
583 'default' => "off",
584 'widget_type' => 'pro',
585 'plugin_name' => 'woocommerce',
586 'plugin_path' => 'woocommerce/woocommerce.php',
587 'content_type' => 'single',
588 'demo_url' => 'https://storekit.pro/demo/product-meta/',
589 'video_url' => '',
590 ],
591 [
592 'name' => 'product-price',
593 'label' => esc_html__('Product Price (Single)', 'ultimate-store-kit'),
594 'type' => 'checkbox',
595 'default' => "off",
596 'widget_type' => 'pro',
597 'plugin_name' => 'woocommerce',
598 'plugin_path' => 'woocommerce/woocommerce.php',
599 'content_type' => 'single',
600 'demo_url' => 'https://storekit.pro/demo/product-price/',
601 'video_url' => '',
602 ],
603 [
604 'name' => 'product-rating',
605 'label' => esc_html__('Product Rating (Single)', 'ultimate-store-kit'),
606 'type' => 'checkbox',
607 'default' => "off",
608 'widget_type' => 'pro',
609 'plugin_name' => 'woocommerce',
610 'plugin_path' => 'woocommerce/woocommerce.php',
611 'content_type' => 'woocommerce single',
612 'demo_url' => 'https://storekit.pro/demo/product-rating/',
613 'video_url' => '',
614 ],
615 [
616 'name' => 'product-related',
617 'label' => esc_html__('Product Related (Single)', 'ultimate-store-kit'),
618 'type' => 'checkbox',
619 'default' => "off",
620 'widget_type' => 'pro',
621 'plugin_name' => 'woocommerce',
622 'plugin_path' => 'woocommerce/woocommerce.php',
623 'content_type' => 'woocommerce',
624 'demo_url' => 'https://storekit.pro/demo/product-related/',
625 'video_url' => '',
626 ],
627 [
628 'name' => 'product-reviews',
629 'label' => esc_html__('Product Reviews', 'ultimate-store-kit'),
630 'type' => 'checkbox',
631 'default' => "on",
632 'widget_type' => 'free',
633 'plugin_name' => 'woocommerce',
634 'plugin_path' => 'woocommerce/woocommerce.php',
635 'content_type' => 'woocommerce others',
636 'demo_url' => 'https://storekit.pro/demo/product-reviews/',
637 'video_url' => 'https://youtu.be/cjpkFVWBmH4',
638 ],
639 [
640 'name' => 'product-review-carousel',
641 'label' => esc_html__('Product Review Carousel', 'ultimate-store-kit'),
642 'type' => 'checkbox',
643 'default' => "on",
644 'widget_type' => 'free',
645 'plugin_name' => 'woocommerce',
646 'plugin_path' => 'woocommerce/woocommerce.php',
647 'content_type' => 'woocommerce others carousel',
648 'demo_url' => 'https://storekit.pro/demo/product-review-carousel/',
649 'video_url' => '',
650 ],
651 [
652 'name' => 'product-stock',
653 'label' => esc_html__('Product Stock (Single)', 'ultimate-store-kit'),
654 'type' => 'checkbox',
655 'default' => "off",
656 'widget_type' => 'pro',
657 'plugin_name' => 'woocommerce',
658 'plugin_path' => 'woocommerce/woocommerce.php',
659 'content_type' => 'woocommerce',
660 'demo_url' => 'https://storekit.pro/demo/product-stock/',
661 'video_url' => '',
662 ],
663 [
664 'name' => 'product-table',
665 'label' => esc_html__('Product Table', 'ultimate-store-kit'),
666 'type' => 'checkbox',
667 'default' => "on",
668 'widget_type' => 'free',
669 'plugin_name' => 'woocommerce',
670 'plugin_path' => 'woocommerce/woocommerce.php',
671 'content_type' => 'woocommerce others',
672 'demo_url' => 'https://storekit.pro/demo/product-table/',
673 'video_url' => '',
674 ],
675 [
676 'name' => 'product-tabs',
677 'label' => esc_html__('Product Tabs (Single)', 'ultimate-store-kit'),
678 'type' => 'checkbox',
679 'default' => "off",
680 'widget_type' => 'pro',
681 'plugin_name' => 'woocommerce',
682 'plugin_path' => 'woocommerce/woocommerce.php',
683 'content_type' => 'woocommerce',
684 'demo_url' => 'https://storekit.pro/demo/product-tabs/',
685 'video_url' => '',
686 ],
687 [
688 'name' => 'product-title',
689 'label' => esc_html__('Product Title (Single)', 'ultimate-store-kit'),
690 'type' => 'checkbox',
691 'default' => "off",
692 'widget_type' => 'pro',
693 'plugin_name' => 'woocommerce',
694 'plugin_path' => 'woocommerce/woocommerce.php',
695 'content_type' => 'woocommerce single',
696 'demo_url' => 'https://storekit.pro/demo/product-title/',
697 'video_url' => '',
698 ],
699 [
700 'name' => 'shiny-grid',
701 'label' => esc_html__('Shiny Grid', 'ultimate-store-kit'),
702 'type' => 'checkbox',
703 'default' => "on",
704 'widget_type' => 'free',
705 'plugin_name' => 'woocommerce',
706 'plugin_path' => 'woocommerce/woocommerce.php',
707 'content_type' => 'woocommerce grid',
708 'demo_url' => 'https://storekit.pro/demo/shiny-grid/',
709 'video_url' => '',
710 ],
711 [
712 'name' => 'shiny-carousel',
713 'label' => esc_html__('Shiny Carousel', 'ultimate-store-kit'),
714 'type' => 'checkbox',
715 'default' => "on",
716 'widget_type' => 'free',
717 'plugin_name' => 'woocommerce',
718 'plugin_path' => 'woocommerce/woocommerce.php',
719 'content_type' => 'woocommerce carousel',
720 'demo_url' => 'https://storekit.pro/demo/shiny-carousel/',
721 'video_url' => '',
722 ],
723 [
724 'name' => 'showcase-slider',
725 'label' => esc_html__('Showcase Slider', 'ultimate-store-kit'),
726 'type' => 'checkbox',
727 'default' => "on",
728 'widget_type' => 'free',
729 'plugin_name' => 'woocommerce',
730 'plugin_path' => 'woocommerce/woocommerce.php',
731 'content_type' => 'woocommerce slider',
732 'demo_url' => 'https://storekit.pro/demo/showcase-slider/',
733 'video_url' => '',
734 ],
735
736 [
737 'name' => 'sub-category',
738 'label' => esc_html__('Sub Category', 'ultimate-store-kit'),
739 'type' => 'checkbox',
740 'default' => "on",
741 'widget_type' => 'free',
742 'plugin_name' => 'woocommerce',
743 'plugin_path' => 'woocommerce/woocommerce.php',
744 'content_type' => 'woocommerce grid',
745 'demo_url' => 'https://storekit.pro/demo/sub-category/',
746 'video_url' => '',
747 ],
748 [
749 'name' => 'sub-category-carousel',
750 'label' => esc_html__('Sub Category Carousel', 'ultimate-store-kit'),
751 'type' => 'checkbox',
752 'default' => "on",
753 'widget_type' => 'free',
754 'plugin_name' => 'woocommerce',
755 'plugin_path' => 'woocommerce/woocommerce.php',
756 'content_type' => 'woocommerce carousel',
757 'demo_url' => 'https://storekit.pro/demo/sub-category-carousel/',
758 'video_url' => '',
759 ],
760
761 [
762 'name' => 'thankyou-order',
763 'label' => esc_html__('Thank You Order', 'ultimate-store-kit'),
764 'type' => 'checkbox',
765 'default' => "off",
766 'widget_type' => 'pro',
767 'plugin_name' => 'woocommerce',
768 'plugin_path' => 'woocommerce/woocommerce.php',
769 'content_type' => 'woocommerce thank-you order',
770 'demo_url' => 'https://storekit.pro/demo/thankyou-order/',
771 'video_url' => '',
772 ],
773 [
774 'name' => 'thankyou-order-details',
775 'label' => esc_html__('Thank You Order Details', 'ultimate-store-kit'),
776 'type' => 'checkbox',
777 'default' => "off",
778 'widget_type' => 'pro',
779 'plugin_name' => 'woocommerce',
780 'plugin_path' => 'woocommerce/woocommerce.php',
781 'content_type' => 'woocommerce thank-you order',
782 'demo_url' => 'https://storekit.pro/demo/thankyou-order-details/',
783 'video_url' => '',
784 ],
785 [
786 'name' => 'thankyou-order-customer-address',
787 'label' => esc_html__('Thank You Order Customer Address', 'ultimate-store-kit'),
788 'type' => 'checkbox',
789 'default' => "off",
790 'widget_type' => 'pro',
791 'plugin_name' => 'woocommerce',
792 'plugin_path' => 'woocommerce/woocommerce.php',
793 'content_type' => 'woocommerce thank-you order',
794 'demo_url' => 'https://storekit.pro/demo/thankyou-order-customer-address/',
795 'video_url' => '',
796 ],
797 [
798 'name' => 'thankyou-order-confirmation',
799 'label' => esc_html__('Thank You Order Confirmation', 'ultimate-store-kit'),
800 'type' => 'checkbox',
801 'default' => "off",
802 'widget_type' => 'pro',
803 'plugin_name' => 'woocommerce',
804 'plugin_path' => 'woocommerce/woocommerce.php',
805 'content_type' => 'woocommerce thank-you order',
806 'demo_url' => 'https://storekit.pro/demo/thankyou-order-confirmation/',
807 'video_url' => '',
808 ],
809 [
810 'name' => 'wishlist-button',
811 'label' => esc_html__('Wishlist Button', 'ultimate-store-kit'),
812 'type' => 'checkbox',
813 'default' => "on",
814 'widget_type' => 'pro',
815 'plugin_name' => 'woocommerce',
816 'plugin_path' => 'woocommerce/woocommerce.php',
817 'content_type' => 'woocommerce others',
818 'demo_url' => 'https://storekit.pro/demo/wishlist-button/',
819 'video_url' => '',
820 ],
821 [
822 'name' => 'wishlist-products',
823 'label' => esc_html__('Wishlist Products', 'ultimate-store-kit'),
824 'type' => 'checkbox',
825 'default' => "on",
826 'widget_type' => 'pro',
827 'plugin_name' => 'woocommerce',
828 'plugin_path' => 'woocommerce/woocommerce.php',
829 'content_type' => 'woocommerce others',
830 'demo_url' => 'https://storekit.pro/demo/wishlist-products/',
831 'video_url' => '',
832 ],
833 [
834 'name' => 'up-sells',
835 'label' => esc_html__('Upsells', 'ultimate-store-kit'),
836 'type' => 'checkbox',
837 'default' => "off",
838 'widget_type' => 'free',
839 'plugin_name' => 'woocommerce',
840 'plugin_path' => 'woocommerce/woocommerce.php',
841 'content_type' => 'woocommerce others',
842 'demo_url' => 'https://storekit.pro/demo/up-sells/',
843 'video_url' => '',
844 ],
845 ],
846 'ultimate_store_kit_edd_modules' => [
847 [
848 'name' => 'edd-category-grid',
849 'label' => esc_html__('EDD Category Grid', 'ultimate-store-kit'),
850 'type' => 'checkbox',
851 'default' => "on",
852 'plugin_name' => 'easy-digital-downloads',
853 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
854 'widget_type' => 'free',
855 'content_type' => 'edd grid',
856 'demo_url' => 'https://storekit.pro/demo/edd-category-grid/',
857 'video_url' => '',
858 ],
859 [
860 'name' => 'edd-category-carousel',
861 'label' => esc_html__('EDD Category Carousel', 'ultimate-store-kit'),
862 'type' => 'checkbox',
863 'default' => "on",
864 'plugin_name' => 'easy-digital-downloads',
865 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
866 'widget_type' => 'free',
867 'content_type' => 'edd carousel',
868 'demo_url' => 'https://storekit.pro/demo/edd-category-carousel/',
869 'video_url' => '',
870 ],
871 [
872 'name' => 'edd-beauty-grid',
873 'label' => esc_html__('EDD Beauty Grid', 'ultimate-store-kit'),
874 'type' => 'checkbox',
875 'default' => "on",
876 'plugin_name' => 'easy-digital-downloads',
877 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
878 'widget_type' => 'free',
879 'content_type' => 'edd grid',
880 'demo_url' => 'https://storekit.pro/demo/edd-beauty-grid/',
881 'video_url' => '',
882 ],
883 [
884 'name' => 'edd-beauty-carousel',
885 'label' => esc_html__('EDD Beauty Carousel', 'ultimate-store-kit'),
886 'type' => 'checkbox',
887 'default' => "on",
888 'plugin_name' => 'easy-digital-downloads',
889 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
890 'widget_type' => 'free',
891 'content_type' => 'edd carousel',
892 'demo_url' => 'https://storekit.pro/demo/edd-beauty-carousel/',
893 'video_url' => 'https://youtu.be/YxPfPZUu_3M?si=8zJ9aWZ1NV4iOubs',
894 ],
895 [
896 'name' => 'edd-classic-grid',
897 'label' => esc_html__('EDD Classic Grid', 'ultimate-store-kit'),
898 'type' => 'checkbox',
899 'default' => "on",
900 'plugin_name' => 'easy-digital-downloads',
901 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
902 'widget_type' => 'free',
903 'content_type' => 'edd grid',
904 'demo_url' => 'https://storekit.pro/demo/edd-classic-grid/',
905 'video_url' => '',
906 ],
907 [
908 'name' => 'edd-classic-carousel',
909 'label' => esc_html__('EDD Classic Carousel', 'ultimate-store-kit'),
910 'type' => 'checkbox',
911 'default' => "on",
912 'plugin_name' => 'easy-digital-downloads',
913 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
914 'widget_type' => 'free',
915 'content_type' => 'edd carousel',
916 'demo_url' => 'https://storekit.pro/demo/edd-classic-carousel/',
917 'video_url' => '',
918 ],
919 [
920 'name' => 'edd-product-reviews',
921 'label' => esc_html__('EDD Product Review', 'ultimate-store-kit'),
922 'type' => 'checkbox',
923 'default' => "off",
924 'plugin_name' => 'easy-digital-downloads',
925 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
926 'widget_type' => 'pro',
927 'content_type' => 'edd',
928 'demo_url' => 'https://storekit.pro/demo/edd-product-reviews/',
929 'video_url' => '',
930 ],
931 [
932 'name' => 'edd-product-review-carousel',
933 'label' => esc_html__('EDD Product Review Carousel', 'ultimate-store-kit'),
934 'type' => 'checkbox',
935 'default' => "off",
936 'plugin_name' => 'easy-digital-downloads',
937 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
938 'widget_type' => 'pro',
939 'content_type' => 'edd',
940 'demo_url' => 'https://storekit.pro/demo/edd-product-review-carousel/',
941 'video_url' => '',
942 ],
943 [
944 'name' => 'edd-standard-grid',
945 'label' => esc_html__('EDD Standard Grid', 'ultimate-store-kit'),
946 'type' => 'checkbox',
947 'default' => "on",
948 'plugin_name' => 'easy-digital-downloads',
949 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
950 'widget_type' => 'free',
951 'content_type' => 'edd grid',
952 'demo_url' => 'https://storekit.pro/demo/edd-standard-grid/',
953 'video_url' => '',
954 ],
955 [
956 'name' => 'edd-standard-carousel',
957 'label' => esc_html__('EDD Standard Carousel', 'ultimate-store-kit'),
958 'type' => 'checkbox',
959 'default' => "on",
960 'plugin_name' => 'easy-digital-downloads',
961 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
962 'widget_type' => 'free',
963 'content_type' => 'edd carousel',
964 'demo_url' => 'https://storekit.pro/demo/edd-standard-carousel/',
965 'video_url' => '',
966 ],
967 [
968 'name' => 'edd-trendy-grid',
969 'label' => esc_html__('EDD Trendy Grid', 'ultimate-store-kit'),
970 'type' => 'checkbox',
971 'default' => "on",
972 'plugin_name' => 'easy-digital-downloads',
973 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
974 'widget_type' => 'free',
975 'content_type' => 'edd grid',
976 'demo_url' => 'https://storekit.pro/demo/edd-trendy-grid/',
977 'video_url' => '',
978 ],
979 [
980 'name' => 'edd-trendy-carousel',
981 'label' => esc_html__('EDD Trendy Carousel', 'ultimate-store-kit'),
982 'type' => 'checkbox',
983 'default' => "on",
984 'plugin_name' => 'easy-digital-downloads',
985 'plugin_path' => 'easy-digital-downloads/easy-digital-downloads.php',
986 'widget_type' => 'free',
987 'content_type' => 'edd carousel',
988 'demo_url' => 'https://storekit.pro/demo/edd-trendy-carousel/',
989 'video_url' => '',
990 ]
991 ],
992 'ultimate_store_kit_general_modules' => [
993 [
994 'name' => 'brand-grid',
995 'label' => esc_html__('Brand Grid', 'ultimate-store-kit'),
996 'type' => 'checkbox',
997 'default' => "on",
998 'widget_type' => 'free',
999 'content_type' => 'grid',
1000 'demo_url' => 'https://storekit.pro/demo/brand-grid/',
1001 'video_url' => '',
1002 ],
1003 [
1004 'name' => 'brand-carousel',
1005 'label' => esc_html__('Brand Carousel', 'ultimate-store-kit'),
1006 'type' => 'checkbox',
1007 'default' => "on",
1008 'widget_type' => 'free',
1009 'content_type' => 'carousel',
1010 'demo_url' => 'https://storekit.pro/demo/brand-carousel/',
1011 'video_url' => '',
1012 ],
1013 [
1014 'name' => 'featured-box',
1015 'label' => esc_html__('Featured Box', 'ultimate-store-kit'),
1016 'type' => 'checkbox',
1017 'default' => "on",
1018 'widget_type' => 'free',
1019 'content_type' => 'others',
1020 'demo_url' => 'https://storekit.pro/demo/featured-box/',
1021 'video_url' => '',
1022 ],
1023 [
1024 'name' => 'qr-code',
1025 'label' => esc_html__('QR Code', 'ultimate-store-kit'),
1026 'type' => 'checkbox',
1027 'default' => "on",
1028 'widget_type' => 'pro',
1029 'content_type' => 'others',
1030 'demo_url' => 'https://storekit.pro/demo/qr-code/',
1031 'video_url' => '',
1032 ],
1033 [
1034 'name' => 'marquee',
1035 'label' => esc_html__('Marquee', 'ultimate-store-kit'),
1036 'type' => 'checkbox',
1037 'default' => "off",
1038 'widget_type' => 'pro',
1039 'content_type' => 'others new',
1040 'demo_url' => 'https://storekit.pro/demo/marquee/',
1041 'video_url' => '',
1042 ],
1043 [
1044 'name' => 'mobile-menu',
1045 'label' => esc_html__('Mobile Menu', 'ultimate-store-kit'),
1046 'type' => 'checkbox',
1047 'default' => "off",
1048 'widget_type' => 'free',
1049 'content_type' => 'others new',
1050 'demo_url' => 'https://storekit.pro/demo/mobile-menu/',
1051 'video_url' => '',
1052 ]
1053 ],
1054 'ultimate_store_kit_other_settings' => []
1055 ];
1056
1057 $settings = [];
1058 $settings['settings_fields'] = $settings_fields;
1059
1060 return $callable($settings);
1061 }
1062
1063 private static function _is_plugin_installed($plugin, $plugin_path) {
1064 $installed_plugins = get_plugins();
1065 return isset($installed_plugins[$plugin_path]);
1066 }
1067
1068 public static function is_module_active($module_id, $options, $module_path = BDTUSK_MODULES_PATH) {
1069 if (!isset($options[$module_id])) {
1070 if (file_exists($module_path . $module_id . '/module.info.php')) {
1071 $module_data = require $module_path . $module_id . '/module.info.php';
1072 return $module_data['default_activation'];
1073 }
1074 } else {
1075 return $options[$module_id] == 'on';
1076 }
1077 }
1078
1079 public static function is_plugin_active($plugin_path) {
1080 if ($plugin_path) {
1081 return is_plugin_active($plugin_path);
1082 }
1083 }
1084
1085 public static function has_module_style($module_id, $module_path = BDTUSK_MODULES_PATH) {
1086 if (file_exists($module_path . $module_id . '/module.info.php')) {
1087 $module_data = require $module_path . $module_id . '/module.info.php';
1088
1089 if (isset($module_data['has_style'])) {
1090 return $module_data['has_style'];
1091 }
1092 }
1093 }
1094
1095 public static function has_module_script($module_id, $module_path = BDTUSK_MODULES_PATH) {
1096 if (file_exists($module_path . $module_id . '/module.info.php')) {
1097 $module_data = require $module_path . $module_id . '/module.info.php';
1098
1099 if (isset($module_data['has_script'])) {
1100 return $module_data['has_script'];
1101 }
1102 }
1103 }
1104 }
1105