PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.2.6
Easy Elements for Elementor – Addons & Website Templates v1.2.6
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / base.php

base.php in Easy Elements for Elementor – Addons & Website Templates 1.2.6, at base.php

588 lines 18.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 final class Easyel_Elements_Elementor_Extension {
7
8 const VERSION = EASYELEMENTS_VER;
9
10 private static $_instance = null;
11
12 public static function instance() {
13 if ( is_null( self::$_instance ) ) {
14 self::$_instance = new self();
15 }
16 return self::$_instance;
17 }
18
19 public function __construct() {
20
21 add_action( 'init', [ $this, 'init' ] );
22 add_action( 'elementor/widgets/register', [ $this, 'init_widgets' ] );
23 add_action( 'elementor/elements/categories_registered', [ $this, 'add_elementor_categories' ] );
24
25 add_action( 'admin_notices', [ $this, 'easyel_admin_promo_notice' ] , 0 );
26 add_action( 'admin_init', [ $this, 'easyel_admin_promo_notice_dismiss_handler' ] );
27
28 add_filter('plugin_action_links_'.EASYELEMENTS_PATH,[ $this,'easyel_setting_page_link' ] );
29
30 add_action( 'plugins_loaded', [ $this, "easyel_plugin_loaded" ] );
31
32 register_activation_hook( EASYELEMENTS_PATH, [ __CLASS__, 'easy_elements_activate' ] );
33
34 add_action('elementor/controls/register', function( $controls_manager ) {
35 $controls_manager->register(
36 new \Easyel\EasyElements\Utils\SearchSelect2()
37 );
38 });
39
40 \Easyel\EasyElements\Extensions\WrapperLink\EasyelWrapperLink::get_instance();
41
42 }
43
44 public static function easy_elements_activate() {
45
46 if ( class_exists( '\Easyel\EasyElements\Admin\Admin_Settings' ) ) {
47
48 $option_key_extension = 'easy_element_extensions';
49 $settings = get_option( $option_key_extension, [] );
50
51 $include_extension = array(
52 "enable_wrapper_link",
53 "enable_post_duplicator",
54 "enable_dynamic_content",
55 );
56
57 $fields2 = [];
58
59 if ( function_exists('easyel_get_extension_fields') ) {
60 $fields2 = easyel_get_extension_fields();
61 }
62
63 foreach ( $fields2 as $key => $data ) {
64
65 if ( array_key_exists( $key, $settings ) ) {
66 continue;
67 }
68
69 $settings[$key] = in_array( $key, $include_extension, true ) ? 1 : 0;
70 }
71
72 update_option( $option_key_extension, $settings );
73
74 $include_widget = array(
75 "easy_table",
76 "bmi_calculator",
77 );
78
79 $available_elements = \Easyel\EasyElements\Admin\Admin_Settings::get_instance()->easyel_elements_get_available_widgets();
80 $tab = 'widget';
81
82 foreach ( $available_elements as $key => $widget ) {
83
84 if ( isset( $widget['tab'] ) && $widget['tab'] === $tab ) {
85
86 $option_name = 'easy_element_' . $tab . '_' . $key;
87
88 $existing_value = get_option( $option_name, null );
89
90 if ( $existing_value !== null ) {
91 continue;
92 }
93
94 if ( in_array( $key, $include_widget, true ) ) {
95 add_option( $option_name, '0' );
96 }
97 }
98 }
99 }
100
101 flush_rewrite_rules();
102 }
103
104 public function easyel_admin_promo_notice() {
105
106 // Already dismissed
107 if ( get_option( 'easyel_admin_promo_notice_dismissed2' ) ) {
108 return;
109 }
110
111 $dismiss_url = wp_nonce_url(
112 add_query_arg(
113 [ 'easyel_promo_notice_dismiss' => '1' ],
114 admin_url()
115 ),
116 'easyel_promo_notice_dismiss_nonce'
117 );
118 ?>
119
120 <div class="notice notice-info easyel-promo-notice">
121 <div class="easyel-promo-content">
122 <div class="easyel-promo-left">
123 <span class="orange">Holiday & New Year Sale</span> <span></span> Discount Up To
124 <span style="color:#ff7dcb;">65%</span> OFF
125 <a class="easyel-promo-btn" href="https://wpeasyelements.com/pricing/" target="_blank">
126 Grab the Deal
127 </a>
128
129 </div>
130 <div class="easyel-promo-right">
131 <a href="<?php echo esc_url( $dismiss_url ); ?>" style="text-decoration:none;">
132 Dismiss
133 </a>
134 </div>
135 </div>
136 </div>
137
138 <?php
139 }
140
141 public function easyel_admin_promo_notice_dismiss_handler() {
142
143 if ( ! is_admin() ) {
144 return;
145 }
146
147 if ( empty( $_GET['easyel_promo_notice_dismiss'] ) ) {
148 return;
149 }
150
151 $nonce = isset( $_GET['_wpnonce'] )
152 ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) )
153 : '';
154
155 if ( ! wp_verify_nonce( $nonce, 'easyel_promo_notice_dismiss_nonce' ) ) {
156 return;
157 }
158
159 update_option( 'easyel_admin_promo_notice_dismissed2', 1 );
160
161 wp_safe_redirect(
162 remove_query_arg( [ 'easyel_promo_notice_dismiss', '_wpnonce' ] )
163 );
164 exit;
165 }
166
167 public function init() {
168 // Safety checks
169
170 add_filter( 'body_class', [ $this, "easy_add_extra_body_class" ] );
171 add_action( 'easy_header', [ $this, 'easyel_before_content_container_hfe'], 20 );
172 add_action( 'easy_footer', [ $this, 'easyel_after_content_container_hfe' ], 5 );
173
174 add_action( 'admin_notices', [ $this, 'easyelements_admin_notice_missing_elementor' ] );
175 }
176
177 public function easyel_plugin_loaded () {
178
179 \Easyel\EasyElements\Utils\Enqueue::get_instance();
180 \Easyel\EasyElements\Utils\QueryHelper::get_instance();
181
182 if( is_admin() ) {
183 \Easyel\EasyElements\Admin\Admin_Settings::get_instance();
184 }
185
186 if ( did_action( 'elementor/loaded' ) ) {
187 \Easyel\EasyElements\Template_Library\Easyel_Templates_Library::get_instance();
188 \Easyel\EasyElements\Header_Footer_Builder\Classes\Easy_Header_Footer_Elementor::get_instance();
189 }
190
191 \Easyel\EasyElements\Theme_Builder\Easyel_Theme_Builder_CPT::get_instance();
192
193 \Easyel\EasyElements\Theme_Builder\Easyel_Theme_Builder_Front::get_instance();
194
195 \Easyel\EasyElements\PostType\OffcanvasPostType::get_instance();
196 \Easyel\EasyElements\CustomCode\Easyel_Custom_Code::get_instance();
197 \Easyel\EasyElements\Extensions\ExtensionHook\ExtensionModule::get_instance();
198 \Easyel\EasyElements\Extensions\CustomCss\EasyelCustomCss::get_instance()->init();
199 \Easyel\EasyElements\Extensions\Duplicator\EasyelDuplicator::get_instance();
200 \Easyel\EasyElements\Extensions\SettingExport\EasyelExport::get_instance();
201 \Easyel\EasyElements\Extensions\LiveCopy\CopyPaste::get_instance();
202 \Easyel\EasyElements\Extensions\VisibilityControl\VisibilityModule::get_instance();
203 \Easyel\EasyElements\Extensions\Jarallax\JaralaxControl::get_instance()->init();
204 \Easyel\EasyElements\Extensions\Jarallax\GlobalJarallax::get_instance();;
205
206 if ( ! class_exists( '\Appsero\Client' ) ) {
207 return;
208 }
209
210 \Easyel\EasyElements\Tracking\Appsero_Tracker::instance();
211 }
212
213 public function easyelements_admin_notice_missing_elementor() {
214
215 $elementor = 'elementor/elementor.php';
216
217 if ( current_user_can( 'activate_plugins' ) && isset( $_GET['activate'], $_GET['_wpnonce'] ) ) {
218
219 $nonce = isset( $_GET['_wpnonce'] ) ? sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ) : '';
220
221 if ( wp_verify_nonce( $nonce, 'activate-plugin_' . $elementor ) ) {
222 unset( $_GET['activate'] );
223 }
224 }
225
226 if ( ! current_user_can( 'install_plugins' ) ) {
227 return;
228 }
229
230 $elementor = 'elementor/elementor.php';
231 $elementor_path = WP_PLUGIN_DIR . '/' . $elementor;
232
233 $is_installed = file_exists( $elementor_path );
234 $is_active = function_exists( 'is_plugin_active' ) && is_plugin_active( $elementor );
235
236 if ( $is_active ) {
237 return;
238 }
239
240 if ( $is_installed ) {
241 $action_url = wp_nonce_url(
242 self_admin_url( 'plugins.php?action=activate&plugin=' . $elementor ),
243 'activate-plugin_' . $elementor
244 );
245
246 $button_label = esc_html__( 'Activate Elementor', 'easy-elements' );
247 $notice_text = esc_html__( 'Easy Elements is not working because the Elementor plugin is inactive.', 'easy-elements' );
248
249 } else {
250 $action_url = wp_nonce_url(
251 self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ),
252 'install-plugin_elementor'
253 );
254
255 $button_label = esc_html__( 'Install Elementor', 'easy-elements' );
256 $notice_text = esc_html__( 'Easy Elements requires the Elementor plugin to be installed.', 'easy-elements' );
257 }
258
259 $message = '<p>' . $notice_text . '</p>';
260 $message .= '<p><a href="' . esc_url( $action_url ) . '" class="button-primary">' . $button_label . '</a></p>';
261
262 printf(
263 '<div class="notice notice-error is-dismissible">%s</div>',
264 wp_kses_post( $message )
265 );
266 }
267
268 // Container Full site
269 public function easyel_before_content_container_hfe() {
270 if ( is_admin() ) return;
271 if ( function_exists( 'elementor_theme_do_location' ) && \Elementor\Plugin::$instance->preview->is_preview() ) {
272 return;
273 }
274 echo '<div class="easyel-content-container">';
275 }
276
277 /**
278 * Close container before HFE Footer
279 */
280 function easyel_after_content_container_hfe() {
281 if ( is_admin() ) return;
282 if ( function_exists( 'elementor_theme_do_location' ) && \Elementor\Plugin::$instance->preview->is_preview() ) {
283 return;
284 }
285 echo '</div>';
286 }
287
288 public function easy_add_extra_body_class( $classes ) {
289 if ( is_plugin_active( 'easy-elements/easy-elements.php' ) ) {
290 $classes[] = 'eel-easy-elements';
291 }
292
293 return $classes;
294 }
295
296 public function add_elementor_categories( $elements_manager ) {
297
298 $new_categories = [
299 'easyelements_category' => [
300 'title' => __( 'Easy Elements', 'easy-elements' ),
301 'icon' => 'fa fa-plug',
302 ],
303 'easyelements_post_category' => [
304 'title' => __( 'Easy Post Type Elements', 'easy-elements' ),
305 'icon' => 'fa fa-file-alt',
306 ],
307 'easyelements_header_footer_category' => [
308 'title' => __( 'Easy Header Footer Elements', 'easy-elements' ),
309 'icon' => 'fa fa-header',
310 ],
311 'easyelements_category_form' => [
312 'title' => __( 'Easy Elements Form', 'easy-elements' ),
313 'icon' => 'fa fa-plug',
314 ],
315 'easyelements_category_pro' => [
316 'title' => __( 'Easy Elements Pro', 'easy-elements' ),
317 'icon' => 'fa fa-plug',
318 ],
319 ];
320
321 $existing = $elements_manager->get_categories();
322 $final_list = [];
323
324 foreach ( $existing as $key => $cat ) {
325 $final_list[ $key ] = $cat;
326
327 if ( $key === 'layout' ) {
328 foreach ( $new_categories as $new_key => $new_cat ) {
329 $final_list[ $new_key ] = $new_cat;
330 }
331 }
332 }
333
334 $apply_categories = function( $cats ) {
335 $this->categories = $cats;
336 };
337
338 $apply_categories->call( $elements_manager, $final_list );
339 }
340
341 public function init_widgets() {
342 $widgets_manager = \Elementor\Plugin::instance()->widgets_manager;
343
344 $widgets = [
345 'site_logo' => [
346 'class' => '\Easyel\EasyElements\Widgets\Easyel_Site_Logo_Widget',
347 'file' => EASYELEMENTS_DIR_PATH . '/widgets/site-logo/site-logo.php',
348 'tab' => 'widget'
349 ],
350 'heading' => [
351 'class' => '\Easyel\EasyElements\Widgets\Easyel_Heading_Widget',
352 'file' => EASYELEMENTS_DIR_PATH . '/widgets/heading/heading.php',
353 'tab' => 'widget'
354 ],
355 'clients_logo' => [
356 'class' => '\Easyel\EasyElements\Widgets\Easyel_Clients_Logo__Widget',
357 'file' => EASYELEMENTS_DIR_PATH . '/widgets/clients-logo-grid/logo.php',
358 'tab' => 'widget'
359 ],
360 'icon_box' => [
361 'class' => '\Easyel\EasyElements\Widgets\Easyel_Icon_Box__Widget',
362 'file' => EASYELEMENTS_DIR_PATH . '/widgets/icon-box/icon.php',
363 'tab' => 'widget'
364 ],
365 'simple_tab' => [
366 'class' => '\Easyel\EasyElements\Widgets\EasyElements\Widgets\Easyel_Tab_Widget',
367 'file' => EASYELEMENTS_DIR_PATH . '/widgets/tab/tab.php',
368 'tab' => 'widget'
369 ],
370 'testimonials' => [
371 'class' => '\Easyel\EasyElements\Widgets\Easyel_Testimonials__Widget',
372 'file' => EASYELEMENTS_DIR_PATH . '/widgets/testimonials-grid/testimonials.php',
373 'tab' => 'widget'
374 ],
375 'team_grid' => [
376 'class' => '\Easyel\EasyElements\Widgets\Easyel_Team_Grid__Widget',
377 'file' => EASYELEMENTS_DIR_PATH . '/widgets/team-grid/team-grid.php',
378 'tab' => 'widget'
379 ],
380 'search' => [
381 'class' => '\Easyel\EasyElements\Widgets\Easyel_Search_Widget',
382 'file' => EASYELEMENTS_DIR_PATH . '/widgets/search/search.php',
383 'tab' => 'widget'
384 ],
385 'contact_box' => [
386 'class' => '\Easyel\EasyElements\Widgets\Easyel_Contact_Box__Widget',
387 'file' => EASYELEMENTS_DIR_PATH . '/widgets/contact-box/contact.php',
388 'tab' => 'widget'
389 ],
390 'faq' => [
391 'class' => '\Easyel\EasyElements\Widgets\Easyel_FAQ_Accordion_Widget',
392 'file' => EASYELEMENTS_DIR_PATH . '/widgets/faq/faq.php',
393 'tab' => 'widget'
394 ],
395 'blog_grid' => [
396 'class' => '\Easyel\EasyElements\Widgets\Easyel_Blog_Grid__Widget',
397 'file' => EASYELEMENTS_DIR_PATH . '/widgets/blog-grid/blog-grid.php',
398 'tab' => 'widget'
399 ],
400 'video' => [
401 'class' => '\Easyel\EasyElements\Widgets\Easyel_Video_Popup_Widget',
402 'file' => EASYELEMENTS_DIR_PATH . '/widgets/video/video.php',
403 'tab' => 'widget'
404 ],
405 'pricing_table' => [
406 'class' => '\Easyel\EasyElements\Widgets\Easyel_Pricing_Table_Widget',
407 'file' => EASYELEMENTS_DIR_PATH . '/widgets/pricing-table/pricing.php',
408 'tab' => 'widget'
409 ],
410 'service_list' => [
411 'class' => '\Easyel\EasyElements\Widgets\Easyel_Service_List_Widget',
412 'file' => EASYELEMENTS_DIR_PATH . '/widgets/service-list/service-list.php',
413 'tab' => 'widget'
414 ],
415 'navigation_menu' => [
416 'class' => '\Easyel\EasyElements\Widgets\Easyel_Navigation_Menu_Widget',
417 'file' => EASYELEMENTS_DIR_PATH . '/widgets/navigation-menu/navigation-menu.php',
418 'tab' => 'widget'
419 ],
420 'page_title' => [
421 'class' => '\Easyel\EasyElements\Widgets\Easyel_Page_Title_Widget',
422 'file' => EASYELEMENTS_DIR_PATH . '/widgets/page-title/page-title.php',
423 'tab' => 'widget'
424 ],
425 'button' => [
426 'class' => '\Easyel\EasyElements\Widgets\Easyel_Button_Widget',
427 'file' => EASYELEMENTS_DIR_PATH . '/widgets/button/button.php',
428 'tab' => 'widget'
429 ],
430 'process_grid' => [
431 'class' => '\Easyel\EasyElements\Widgets\Easyel_Process_Grid_Widget',
432 'file' => EASYELEMENTS_DIR_PATH . '/widgets/process-grid/process-grid.php',
433 'tab' => 'widget'
434 ],
435 'process_list' => [
436 'class' => '\Easyel\EasyElements\Widgets\Easyel_Process_lists_Widget',
437 'file' => EASYELEMENTS_DIR_PATH . '/widgets/process-list/process-list.php',
438 'tab' => 'widget'
439 ],
440 'social_share' => [
441 'class' => '\Easyel\EasyElements\Widgets\Easyel_Social_Share_Widget',
442 'file' => EASYELEMENTS_DIR_PATH . '/widgets/social-share/social-share.php',
443 'tab' => 'widget'
444 ],
445 'social_icon' => [
446 'class' => '\Easyel\EasyElements\Widgets\Easyel_Social_Icon_Widget',
447 'file' => EASYELEMENTS_DIR_PATH . '/widgets/social-icon/social.php',
448 'tab' => 'widget'
449 ],
450 'breadcrumb' => [
451 'class' => '\Easyel\EasyElements\Widgets\Easyel_Breadcrumb_Widget',
452 'file' => EASYELEMENTS_DIR_PATH . '/widgets/breadcrumb/breadcrumb.php',
453 'tab' => 'widget'
454 ],
455 'domain_search' => [
456 'class' => '\Easyel\EasyElements\Widgets\Easyel_Domain_Search_Widget',
457 'file' => EASYELEMENTS_DIR_PATH . '/widgets/domain-search/domain-search.php',
458 'tab' => 'widget'
459 ],
460 'easy_offcanvas' => [
461 'class' => '\Easyel\EasyElements\Widgets\Easyel_Offcanvas_Widget',
462 'file' => EASYELEMENTS_DIR_PATH . '/widgets/offcanvas/offcanvas.php',
463 'tab' => 'widget'
464 ],
465 'easy_table' => [
466 'class' => '\Easyel\EasyElements\Widgets\Easyel_Table_Elementor_Widget',
467 'file' => EASYELEMENTS_DIR_PATH . '/widgets/table/table-normal.php',
468 'tab' => 'widget'
469 ],
470 'easy_scroll_to_top' => [
471 'class' => '\Easyel\EasyElements\Widgets\Easyel_Scroll_To_Top_Widget',
472 'file' => EASYELEMENTS_DIR_PATH . '/widgets/scroll-to-top/scroll.php',
473 'tab' => 'widget'
474 ],
475 'easy_cf7' => [
476 'class' => '\Easyel\EasyElements\Widgets\easyel__CF7_Widget',
477 'file' => EASYELEMENTS_DIR_PATH . '/widgets/cf7/contact-cf7.php',
478 'tab' => 'widget'
479 ],
480 'easy_gallery' => [
481 'class' => '\Easyel\EasyElements\Widgets\Easyel__Gallery_Widget',
482 'file' => EASYELEMENTS_DIR_PATH . '/widgets/gallery/gallery.php',
483 'tab' => 'widget'
484 ],
485 'easy_progress' => [
486 'class' => '\Easyel\EasyElements\Widgets\Easyel_Progress_Widget',
487 'file' => EASYELEMENTS_DIR_PATH . '/widgets/progress/progress.php',
488 'tab' => 'widget'
489 ],
490 'counter' => [
491 'class' => '\Easyel\EasyElements\Widgets\Easyel_Counter_Widget',
492 'file' => EASYELEMENTS_DIR_PATH . '/widgets/counter/counter.php',
493 'tab' => 'widget'
494 ],
495 'countdown' => [
496 'class' => '\Easyel\EasyElements\Widgets\Easyel_Count_Down_Widget',
497 'file' => EASYELEMENTS_DIR_PATH . '/widgets/countdown/countdown.php',
498 'tab' => 'widget'
499 ],
500 'excerpt' => [
501 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Excerpt_Widget',
502 'file' => EASYELEMENTS_DIR_PATH . '/widgets/excerpt/excerpt.php',
503 'tab' => 'widget'
504 ],
505 'post_title' => [
506 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_Title_Widget',
507 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-title/post-title.php',
508 'tab' => 'widget'
509 ],
510 'post_content' => [
511 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_content_Widget',
512 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-content/post-content.php',
513 'tab' => 'widget'
514 ],
515 'featured_image' => [
516 'class' => '\Easyel\EasyElements\Widgets\Easyel_free_Featured_Image_Widget',
517 'file' => EASYELEMENTS_DIR_PATH . '/widgets/featured-image/featured-image.php',
518 'tab' => 'widget'
519 ],
520 'post_meta' => [
521 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_Meta_Widget',
522 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-meta/post-meta.php',
523 'tab' => 'widget'
524 ],
525 'post_pagination' => [
526 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_Pagination_Widget',
527 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-pagination/post-pagination.php',
528 'tab' => 'widget'
529 ],
530 'post_comments' => [
531 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_Comments_Widget',
532 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-comments/post-comments.php',
533 'tab' => 'widget'
534 ],
535 'post_tags' => [
536 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_Tags_Widget',
537 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-tag/post-tag.php',
538 'tab' => 'widget'
539 ],
540 'post_author' => [
541 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Post_Author_Info_Widget',
542 'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-author/post-author.php',
543 'tab' => 'widget'
544 ],
545 'archive_post' => [
546 'class' => '\Easyel\EasyElements\Widgets\Easyel_Free_Archive_Post__Widget',
547 'file' => EASYELEMENTS_DIR_PATH . '/widgets/archive-post/archive-post.php',
548 'tab' => 'widget',
549 ],
550 'login_register' => [
551 'class' => '\Easyel\EasyElements\Widgets\Easyel_Login_Register_Widget',
552 'file' => EASYELEMENTS_DIR_PATH . '/widgets/login-register/login-register.php',
553 'tab' => 'widget',
554 ],
555 'feature_list' => [
556 'class' => '\Easyel\EasyElements\Widgets\Easyel_Feature_List__Widget',
557 'file' => EASYELEMENTS_DIR_PATH . '/widgets/feature-list/feature-list.php',
558 'tab' => 'widget',
559 ],
560 ];
561
562 foreach ( $widgets as $key => $data ) {
563 $option_name = 'easy_element_' . $data['tab'] . '_' . $key;
564 $enabled = get_option( $option_name, '1' );
565
566 if ( 1 !== ( int ) $enabled ) {
567 continue; // Skip disabled widgets
568 }
569
570 if ( file_exists( $data['file'] ) ) {
571 require_once $data['file'];
572
573 if ( class_exists( $data['class'] ) ) {
574 $widgets_manager->register( new $data['class']() );
575 }
576 }
577 }
578 }
579
580 public function easyel_setting_page_link( $links ) {
581 $action_link = sprintf("<a href='%s'>%s</a>",admin_url('admin.php?page=easy-elements-dashboard'),__('Settings','easy-elements'));
582 array_push( $links,$action_link );
583 return $links;
584 }
585
586 }
587
588 Easyel_Elements_Elementor_Extension::instance();