set_screens(); } // public function load_eae_modules(){ // $helper = new Helper(); // $modules = $helper->get_eae_modules(); // $items = []; // foreach($modules as $key => $module){ // $items[$key] = $module['enabled']; // } // if ( current_user_can( 'manage_options' ) ) { // update_option( 'wts_eae_elements', $items ); // } // //echo "
"; print_r($items); echo "
"; // wp_send_json([ // 'modules' => $items // ]); // } public function eae_save_elements() { if(!wp_verify_nonce($_REQUEST['nonce'], 'eae_ajax_nonce')){ wp_send_json([ 'success' => 0 ]); } $helper = new Helper(); //check_ajax_referer( 'eae_ajax_nonce', 'nonce' ); $elements = $_REQUEST['moduleData']; if(empty($elements)){ return; } $modules = $helper->get_eae_modules(); $items = []; $count = count( $modules ); foreach($elements as $element => $value){ if($value == 'deactivate'){ $enabled = "false"; }else{ $enabled = "true"; } $modules[$element]['enabled'] = $enabled; } foreach($modules as $key => $module){ $items[$key] = $module['enabled']; } if ( current_user_can( 'manage_options' ) ) { update_option( 'wts_eae_elements', $items ); } wp_send_json([ 'modules' => $items, 'success' => 1, ]); } public function eae_save_config() { if(!wp_verify_nonce($_REQUEST['nonce'], 'eae_ajax_nonce')){ wp_send_json([ 'success' => 0 ]); } $settings = $_REQUEST['config']; $gmap_api = sanitize_text_field($settings['wts_eae_gmap_key']); $youtube_api_key = sanitize_text_field($settings['wts_eae_youtube_api_key']); if ( current_user_can( 'manage_options' ) ) { update_option( 'wts_eae_gmap_key', $gmap_api ); update_option('wts_eae_youtube_api_key', $youtube_api_key); // if($settings['eae_particle_library'] == 'tsParticle'){ // $use_tsParticle = 'true'; // }else{ // $use_tsParticle = 'false'; // } // update_option( 'use_tsParticle', $use_tsParticle); } wp_send_json([ 'success' => 1 ]); } public function register_admin_menu() { $icon = $this->get_base64_logo(); add_menu_page( __( 'Addon Elements for Elementor', 'wts-eae' ), __( 'Addon Elements', 'wts-eae' ), 'manage_options', 'eae-settings', [ $this, 'display_settings_page' ], $icon, 99 ); } public function get_base64_logo( $color = '#ffffff' ) { //#E82A5B $base_logo = ' '; //AE Hexagon logo $encoded_logo = base64_encode( $base_logo ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- The encoded version is used as data URI to use the logo in CSS. return 'data:image/svg+xml;base64,' . $encoded_logo; } public function display_settings_page() { $helper = new Helper(); $eae_widgets = []; $eae_ext = []; $this->modules = $helper->get_eae_modules(); $map_key = get_option('wts_eae_gmap_key'); $youtube_api_key = get_option('wts_eae_youtube_api_key'); $use_tsParticle = get_option('use_tsParticle' ,false); $modules = apply_filters( 'wts_eae_active_modules', $this->modules ); foreach($modules as $module_key => $module){ if($module['type'] == 'widget'){ $eae_widgets[$module_key] = $module; }else{ $eae_ext[$module_key] = $module; } } // sort $eae_widgets by array key ksort($eae_widgets); ?>

$widget) { $pro_text = ''; //echo "
";  print_r($widget);  echo "
"; $class = 'eae-module-row'; if ($widget['enabled'] === 'true' || $widget['enabled'] === true) { $class .= ' eae-enabled'; $action_text = __('Deactivate', 'eae-wts'); $action = 'deactivate'; } else { $class .= ' eae-disabled'; $action_text = __('Activate', 'eae-wts'); $action = 'activate'; } if(isset($widget['pro']) && $widget['pro'] === true){ $pro_text = 'Pro'; } ?>
'.esc_html($pro_text).''; } ?>

$widget) { $class = 'eae-module-row'; if ($widget['enabled'] === 'true' || $widget['enabled'] === true) { $class .= ' eae-enabled'; $action_text = __('Deactivate', 'eae-wts'); $action = 'deactivate'; } else { $class .= ' eae-disabled'; $action_text = __('Activate', 'eae-wts'); $action = 'activate'; } ?>

to generate API KEY

How to generate API KEY
Elementor Addon Elements

Addon Elements for Elementor

🎉 New Brand Identity

We're excited to announce our rebranding! Same great features, fresh new look and name.

Read Full Story

Need Help?

Check our documentation or visit the support forum.

View Documentation

🚀 Upgrade to Addon Elements for Elementor Pro Today!

Get meticulously crafted premium widgets to enhance your creative potential. Unleash your imagination and design captivating layouts with ease.

  • Premium Widgets
  • Priority Support
  • Lifetime deal available
  • 14 Days Money Back Guarantee
Upgrade Now Give it a risk free trial with our 14 Days No Questions Asked refund policy.
screens = [ 'toplevel_page_eae-settings', ]; } public function top_bar(){ $nav_links = [ 'toplevel_page_eae-settings' => [ 'label' => __('Home', 'wts-eae'), 'link' => 'admin.php?page=eae-settings' ], 'doc' => [ 'label' => __('Documentation', 'wts-eae'), 'link' => 'https://wpvibes.link/go/ea-docs/' ], 'support' => [ 'label' => __('Get Support', 'wts-eae'), 'link' => 'https://wpvibes.link/go/ea-support/' ] ]; $current_screen = get_current_screen(); //print_r( $current_screen->id); if (!in_array($current_screen->id, $this->screens)) { return; } ?>

Addon Elements for Elementor (formerly Elementor Addon Elements)