PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets / 4.9.5
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution with eCommerce Templates & Woo Widgets v4.9.5
4.9.5 4.9.4 4.9.3 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 / widgets / manifest.php
shopengine / widgets Last commit date
add-to-cart 1 week ago additional-information 3 years ago advanced-search 1 week ago archive-description 3 years ago archive-products 1 week ago archive-result-count 2 years ago archive-title 1 week ago archive-view-mode 1 week ago breadcrumbs 1 week ago call-for-price 1 week ago cart-table 1 week ago cart-totals 1 week ago checkout-coupon-form 1 week ago checkout-form-additional 3 years ago checkout-form-billing 2 years ago checkout-form-login 3 years ago checkout-form-shipping 1 week ago checkout-payment 3 years ago checkout-review-order 3 years ago checkout-shipping-methods 2 years ago cross-sells 1 week ago deal-products 2 years ago empty-cart-message 2 years ago filter-orderby 2 years ago filter-products-per-page 3 years ago filterable-product-list 1 year ago init 1 week ago notice 2 years ago product-categories 3 years ago product-category-lists 1 week ago product-description 1 week ago product-excerpt 1 week ago product-image 1 year ago product-list 1 week ago product-meta 2 years ago product-price 3 years ago product-rating 1 week ago product-review 2 years ago product-share 2 years ago product-sku 3 years ago product-stock 11 months ago product-tabs 1 week ago product-tags 3 years ago product-title 2 years ago qr-code 11 months ago recently-viewed-products 1 week ago related 1 week ago return-to-shop 1 week ago up-sells 1 week ago view-single-product 1 week ago lazy-cache.php 3 years ago manifest.php 1 week ago prod-short-code.php 2 years ago products.php 3 years ago shop.php 3 years ago widget-helper.php 1 week ago
manifest.php
328 lines
1 <?php
2
3 namespace ShopEngine\Widgets;
4
5 defined('ABSPATH') || exit;
6
7 use ShopEngine\Core\Register\Widget_List;
8 use ShopEngine\Widgets\Init\Enqueue_Scripts;
9 use ShopEngine\Widgets\Init\Route;
10
11
12 class Manifest{
13
14 private $widget_list;
15
16 public function init() {
17
18 new Enqueue_Scripts();
19 new Route();
20
21 $this->manifest_widgets();
22
23 add_action('elementor/elements/categories_registered', [$this, 'widget_categories']);
24 add_action('elementor/widgets/register', [$this, 'register_widgets']);
25 add_filter('elementor/editor/localize_settings', [$this, 'promote_pro_widgets'], 1000);
26 add_filter('woocommerce_default_address_fields', function($fields) {
27 foreach ($fields as $key => $value) {
28 unset($fields[$key]['priority']);
29 }
30 return $fields;
31 });
32
33
34 // Check if the MP3 Music Player by Sonaar plugin is active
35 if( ! function_exists('is_plugin_active') ){
36 include_once ABSPATH . 'wp-admin/includes/plugin.php';
37 }
38
39 if(is_plugin_active('mp3-music-player-by-sonaar/sonaar-music.php') || is_plugin_active('smart-wishlist-for-more-convert/smart-wishlist-for-more-convert.php')){
40
41 add_action('elementor/editor/init', [$this, 'category_initialize'], 0);
42
43 }
44
45 }
46
47 public function category_initialize(){
48 $elements_manager = \Elementor\Plugin::instance()->elements_manager;
49 $this->widget_categories($elements_manager);
50 }
51 public function manifest_widgets() {
52
53 foreach(Widget_List::instance()->get_list(true, 'active') as $widget) {
54
55 if(isset($widget['path'])){
56
57 if(file_exists($widget['path'] . '/' . $widget['slug'] . '-config.php')){
58 require_once $widget['path'] . '/' . $widget['slug'] . '-config.php';
59 }
60 }
61
62 if(class_exists($widget['config_class'])){
63 $widget_config = new $widget['config_class']();
64
65 if($widget_config->custom_inline_css() !== false){
66 wp_add_inline_style( 'shopengine-elementor-style', $widget_config->custom_inline_css());
67 }
68
69 if($widget_config->custom_inline_js() !== false){
70 wp_add_inline_script( 'shopengine-elementor-script', $widget_config->custom_inline_css());
71 }
72
73 if($widget_config->custom_init() !== false){
74 add_action('init', [$widget_config, 'custom_init']);
75 }
76 }
77 }
78 }
79
80 public function register_widgets() {
81
82 foreach(Widget_List::instance()->get_list(true, 'active') as $widget) {
83
84 if(isset($widget['path'])){
85
86 if(file_exists($widget['path'] . '/' . $widget['slug'] . '.php')){
87 require_once $widget['path'] . '/' . $widget['slug'] . '.php';
88 }
89 }
90
91 if(isset($widget['base_class']) && class_exists($widget['base_class'])){
92
93 \Elementor\Plugin::instance()->widgets_manager->register(new $widget['base_class']());
94 }
95 }
96 }
97 /**
98 * Promote Pro Widgets
99 *
100 * @param $settings
101 * @return void
102 */
103 public function promote_pro_widgets( $settings ) {
104 if( 'shopengine-template' != get_post_type() || class_exists('\ShopEngine_Pro')) {
105 return $settings;
106 }
107
108 if(isset($settings['promotionWidgets']) && is_array($settings['promotionWidgets'])) {
109 $promotion_widgets = $settings['promotionWidgets'];
110 } else {
111 $promotion_widgets = [];
112 }
113
114 $merged_shopengine_promotion_widgets = array_merge( $promotion_widgets, [
115 [
116 'name' => 'account-dashboard',
117 'title' => esc_html__( 'Account Dashboard', 'shopengine' ),
118 'icon' => 'shopengine-widget-icon shopengine-icon-account_dashboard',
119 'categories' => '["shopengine-my_account"]',
120 ],
121 [
122 'name' => 'account-address',
123 'title' => esc_html__( 'Account Address', 'shopengine' ),
124 'icon' => 'shopengine-widget-icon shopengine-icon-account_address',
125 'categories' => '["shopengine-my_account"]',
126 ],
127 [
128 'name' => 'account-details',
129 'title' => esc_html__( 'Account Details', 'shopengine' ),
130 'icon' => 'shopengine-widget-icon shopengine-icon-account_form_register',
131 'categories' => '["shopengine-my_account"]',
132 ],
133 [
134 'name' => 'account-downloads',
135 'title' => esc_html__( 'Account Downloads', 'shopengine' ),
136 'icon' => 'shopengine-widget-icon shopengine-icon-account_downloads',
137 'categories' => '["shopengine-my_account"]',
138 ],
139 [
140 'name' => 'account-form-login',
141 'title' => esc_html__( 'Account Form Login', 'shopengine' ),
142 'icon' => 'shopengine-widget-icon shopengine-icon-checkout_form_login',
143 'categories' => '["shopengine-my_account"]',
144 ],
145 [
146 'name' => 'account-form-register',
147 'title' => esc_html__( 'Account Form Register', 'shopengine' ),
148 'icon' => 'shopengine-widget-icon shopengine-icon-account_form_register',
149 'categories' => '["shopengine-my_account"]',
150 ],
151 [
152 'name' => 'account-logout',
153 'title' => esc_html__( 'Account Logout', 'shopengine' ),
154 'icon' => 'shopengine-widget-icon shopengine-icon-account_logout',
155 'categories' => '["shopengine-my_account"]',
156 ],
157 [
158 'name' => 'account-navigation',
159 'title' => esc_html__( 'Account Navigation', 'shopengine' ),
160 'icon' => 'shopengine-widget-icon shopengine-icon-account_address',
161 'categories' => '["shopengine-my_account"]',
162 ],
163 [
164 'name' => 'account-order-details',
165 'title' => esc_html__( 'Account Order Details', 'shopengine' ),
166 'icon' => 'shopengine-widget-icon shopengine-icon-thankyou_order_details',
167 'categories' => '["shopengine-my_account"]',
168 ],
169 [
170 'name' => 'account-orders',
171 'title' => esc_html__( 'Account Orders', 'shopengine' ),
172 'icon' => 'shopengine-widget-icon shopengine-icon-orders_ac',
173 'categories' => '["shopengine-my_account"]',
174 ],
175 [
176 'name' => 'account-wishlist',
177 'title' => esc_html__( 'Account Wishlist', 'shopengine' ),
178 'icon' => 'shopengine-widget-icon shopengine-icon-account_wishlist',
179 'categories' => '["shopengine-my_account"]',
180 ],
181 [
182 'name' => 'account-payment-methods',
183 'title' => esc_html__( 'Account Payment Methods', 'shopengine' ),
184 'icon' => 'shopengine-widget-icon shopengine-icon-account_payment_methods',
185 'categories' => '["shopengine-my_account"]',
186 ],
187 [
188 'name' => 'categories',
189 'title' => esc_html__( 'Categories', 'shopengine' ),
190 'icon' => 'shopengine-widget-icon shopengine-icon-product_categories',
191 'categories' => '["shopengine-general"]',
192 ],
193 [
194 'name' => 'product-filters',
195 'title' => esc_html__( 'Product Filters', 'shopengine' ),
196 'icon' => 'shopengine-widget-icon shopengine-icon-cross_sells',
197 'categories' => '["shopengine-archive"]',
198 ],
199 [
200 'name' => 'thankyou-address-details',
201 'title' => esc_html__( 'Thank You Address Details', 'shopengine' ),
202 'icon' => 'shopengine-widget-icon shopengine-icon-thankyou_address_details',
203 'categories' => '["shopengine-pro"]',
204 ],
205 [
206 'name' => 'thankyou-order-confirm',
207 'title' => esc_html__( 'Thank You Order Confirm', 'shopengine' ),
208 'icon' => 'shopengine-widget-icon shopengine-icon-thankyou_order_confirm',
209 'categories' => '["shopengine-order"]',
210 ],
211 [
212 'name' => 'thankyou-order-details',
213 'title' => esc_html__( 'Thank You Order Details', 'shopengine' ),
214 'icon' => 'shopengine-widget-icon shopengine-icon-thankyou_order_details',
215 'categories' => '["shopengine-order"]',
216 ],
217 [
218 'name' => 'thankyou-thankyou',
219 'title' => esc_html__( 'Order Thank You', 'shopengine' ),
220 'icon' => 'shopengine-widget-icon shopengine-icon-thankyou_message',
221 'categories' => '["shopengine-order"]',
222 ],
223 [
224 'name' => 'currency-switcher',
225 'title' => esc_html__( 'Currency Switcher', 'shopengine' ),
226 'icon' => 'shopengine-widget-icon shopengine-icon-checkout_payment',
227 'categories' => '["shopengine-general"]',
228 ],
229 [
230 'name' => 'flash-sale-products',
231 'title' => esc_html__( 'Flash Sale Products', 'shopengine' ),
232 'icon' => 'shopengine-widget-icon shopengine-icon-archive_products',
233 'categories' => '["shopengine-general"]',
234 ],
235 [
236 'name' => 'best-selling-product',
237 'title' => esc_html__( 'Best Selling Product', 'shopengine' ),
238 'icon' => 'shopengine-widget-icon shopengine-icon-orders_ac',
239 'categories' => '["shopengine-general"]',
240 ],
241 [
242 'name' => 'comparison-button',
243 'title' => esc_html__( 'Comparison Button', 'shopengine' ),
244 'icon' => 'shopengine-widget-icon shopengine-icon-product_compare_1',
245 'categories' => '["shopengine-general"]',
246 ],
247 [
248 'name' => 'product-size-charts',
249 'title' => esc_html__( 'Product Size Charts', 'shopengine' ),
250 'icon' => 'eicon-post-list shopengine-widget-icon',
251 'categories' => '["shopengine-single"]',
252 ],
253 [
254 'name' => 'vacation',
255 'title' => esc_html__( 'Vacation', 'shopengine' ),
256 'icon' => 'shopengine-widget-icon shopengine-icon-thankyou_message',
257 'categories' => '["shopengine-vacation"]',
258 ],
259 [
260 'name' => 'advanced-coupon',
261 'title' => esc_html__( 'Advanced Coupon', 'shopengine' ),
262 'icon' => 'shopengine-widget-icon shopengine-icon-checkout_coupon_form',
263 'categories' => '["shopengine-general"]',
264 ],
265 [
266 'name' => 'avatar',
267 'title' => esc_html__( 'Avatar', 'shopengine' ),
268 'icon' => 'shopengine-widget-icon shopengine-icon-checkout_coupon_form',
269 'categories' => '["shopengine-my_account"]',
270 ],
271 [
272 'name' => 'account-form-lost-password',
273 'title' => esc_html__( 'Lost Password', 'shopengine' ),
274 'icon' => 'shopengine-widget-icon shopengine-icon-account_form_register',
275 'categories' => '["shopengine-my_account"]',
276 ],
277 [
278 'name' => 'checkout-order-pay',
279 'title' => esc_html__( 'Checkout Order Pay', 'shopengine' ),
280 'icon' => 'shopengine-widget-icon shopengine-icon-cross_sells',
281 'categories' => '["shopengine-checkout"]',
282 ],
283 [
284 'name' => 'product-carousel',
285 'title' => esc_html__( 'Product Carousel', 'shopengine' ),
286 'icon' => 'eicon-slider-push shopengine-widget-icon',
287 'categories' => '["shopengine-general"]',
288 ]
289 ]);
290
291 $settings['promotionWidgets'] = $merged_shopengine_promotion_widgets;
292
293 return $settings;
294 }
295 public function widget_categories($elements_manager) {
296
297 $elements_manager->add_category('shopengine-general', [
298 'title' => esc_html__('ShopEngine General', 'shopengine'),
299 'icon' => 'fa fa-plug',
300 ]);
301 $elements_manager->add_category('shopengine-single', [
302 'title' => esc_html__('ShopEngine Single Product', 'shopengine'),
303 'icon' => 'fa fa-plug',
304 ]);
305 $elements_manager->add_category('shopengine-cart', [
306 'title' => esc_html__('ShopEngine Cart', 'shopengine'),
307 'icon' => 'fa fa-plug',
308 ]);
309 $elements_manager->add_category('shopengine-archive', [
310 'title' => esc_html__('ShopEngine Product Archive', 'shopengine'),
311 'icon' => 'fa fa-plug',
312 ]);
313 $elements_manager->add_category('shopengine-checkout', [
314 'title' => esc_html__('ShopEngine Checkout', 'shopengine'),
315 'icon' => 'fa fa-plug',
316 ]);
317 $elements_manager->add_category('shopengine-order', [
318 'title' => esc_html__('ShopEngine Order', 'shopengine'),
319 'icon' => 'fa fa-plug',
320 ]);
321 $elements_manager->add_category('shopengine-my_account', [
322 'title' => esc_html__('ShopEngine My Account', 'shopengine'),
323 'icon' => 'fa fa-plug',
324 ]);
325 }
326 }
327
328