PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 2.2.2
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v2.2.2
4.9.2 4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / core / theme-support / theme-support.php
shopengine / core / theme-support Last commit date
theme-support.php 4 years ago
theme-support.php
83 lines
1 <?php
2
3 namespace ShopEngine\Core\Theme_Support;
4
5 use ShopEngine\Core\Builders\Action;
6 use ShopEngine\Core\Register\Module_List;
7 use ShopEngine\Modules\Comparison\Comparison_Cookie;
8 use ShopEngine\Modules\Wishlist\Wishlist;
9
10 defined('ABSPATH') || exit;
11
12 class Theme_Support {
13
14 /**
15 * @return array
16 */
17 public static function get_active_templates() {
18
19 foreach (self::template_list() as $template) {
20
21 $key_type = Action::PK__SHOPENGINE_TEMPLATE . '__' . $template;
22 $template_id = get_option($key_type);
23 $data = ['template_id' => $template_id];
24
25 if (false !== $template_id) {
26 $is_elementor = get_post_meta($template_id, '_elementor_edit_mode', true);
27 if (empty($is_elementor)) {
28 $data['editor'] = 'gutenberg';
29 } else {
30 $data['editor'] = 'elementor';
31 }
32 }
33
34 $templates[$template] = $data;
35 }
36
37 return $templates;
38 }
39
40 public static function get_module_list() {
41 return Module_List::instance()->get_list();
42 }
43
44 public static function get_wishlist_product_ids() {
45
46 if (is_user_logged_in()) {
47
48 return get_user_meta(get_current_user_id(), Wishlist::UMK_WISHLIST, true);
49 }
50
51 if (empty($_COOKIE[Wishlist::COOKIE_KEY])) {
52 return false;
53 }
54
55 return explode(',', $_COOKIE[Wishlist::COOKIE_KEY]);
56 }
57
58 public static function get_comparison_product_ids() {
59 return Comparison_Cookie::get_product_ids();
60 }
61
62 public static function template_list() {
63
64 return [
65 'shop',
66 'archive',
67 'single',
68 'cart',
69 'checkout',
70 'order',
71 'my_account_login',
72 'my_account',
73 'account_orders',
74 'account_downloads',
75 'account_orders_view',
76 'account_edit_account',
77 'account_edit_address',
78 'quick_checkout',
79 'quick_view'
80 ];
81 }
82 }
83