PATH:
home
/
letacommog
/
seneve10
/
wp-content
/
plugins
/
essential-addons-for-elementor-lite
/
includes
/
Classes
<?php namespace Essential_Addons_Elementor\Classes; use Essential_Addons_Elementor\Classes\WPDeveloper_Core_Installer; if (!defined('ABSPATH')) { exit; } // Exit if accessed directly use Essential_Addons_Elementor\Classes\WPML\Eael_WPML; use \Essential_Addons_Elementor\Traits\Admin; use \Essential_Addons_Elementor\Traits\Controls; use \Essential_Addons_Elementor\Traits\Core; use \Essential_Addons_Elementor\Traits\Elements; use \Essential_Addons_Elementor\Traits\Enqueue; use \Essential_Addons_Elementor\Traits\Facebook_Feed; use \Essential_Addons_Elementor\Traits\Generator; use \Essential_Addons_Elementor\Traits\Helper; use \Essential_Addons_Elementor\Traits\Library; use \Essential_Addons_Elementor\Traits\Login_Registration; class Bootstrap { use Library; use Core; use Helper; use Generator; use Enqueue; use Admin; use Elements; use Eael_WPML; use Login_Registration; use Controls; use Facebook_Feed; // instance container private static $instance = null; // request unique id container protected $uid = null; // registered elements container protected $registered_elements; // registered extensions container protected $registered_extensions; // identify whether pro is enabled protected $pro_enabled; // localize objects public $localize_objects = []; // request data container protected $request_requires_update; // loaded templates in a request protected $loaded_templates = []; // loaded elements in a request protected $loaded_elements = []; // used for internal css protected $css_strings; // used for internal js protected $js_strings; // used to store custom js protected $custom_js_strings; /** * Singleton instance * * @since 3.0.0 */ public static function instance() { if (self::$instance == null) { self::$instance = new self; } return self::$instance; } /** * Constructor of plugin class * * @since 3.0.0 */ private function __construct() { // before init hook do_action('eael/before_init'); // search for pro version $this->pro_enabled = apply_filters('eael/pro_enabled', false); // elements classmap $this->registered_elements = apply_filters('eael/registered_elements', $GLOBALS['eael_config']['elements']); // extensions classmap $this->registered_extensions = apply_filters('eael/registered_extensions', $GLOBALS['eael_config']['extensions']); // start plugin tracking if (!$this->pro_enabled) { $this->start_plugin_tracking(); } // register extensions $this->register_extensions(); // register hooks $this->register_hooks(); } protected function register_hooks() { // Core add_action('init', [$this, 'i18n']); add_filter('eael/active_plugins', [$this, 'active_plugins'], 10, 1); add_filter('wpml_elementor_widgets_to_translate', [$this, 'translatable_widgets']); add_action('elementor/editor/after_save', array($this, 'save_global_values'), 10, 2); // Enqueue add_action('eael/before_enqueue_styles', [$this, 'before_enqueue_styles']); add_action('wp_enqueue_scripts', [$this, 'enqueue_scripts']); add_action('elementor/editor/before_enqueue_scripts', [$this, 'editor_enqueue_scripts']); add_action('wp_head', [$this, 'enqueue_inline_styles']); add_action('wp_footer', [$this, 'enqueue_inline_scripts']); // Generator add_action('wp', [$this, 'init_request_data']); add_filter('elementor/frontend/builder_content_data', [$this, 'collect_loaded_templates'], 10, 2); add_action('wp_print_footer_scripts', [$this, 'update_request_data']); // Ajax add_action('wp_ajax_load_more', array($this, 'ajax_load_more')); add_action('wp_ajax_nopriv_load_more', array($this, 'ajax_load_more')); add_action('wp_ajax_facebook_feed_load_more', [$this, 'facebook_feed_render_items']); add_action('wp_ajax_nopriv_facebook_feed_load_more', [$this, 'facebook_feed_render_items']); add_action('wp_ajax_woo_checkout_update_order_review', [$this, 'woo_checkout_update_order_review']); add_action('wp_ajax_nopriv_woo_checkout_update_order_review', [$this, 'woo_checkout_update_order_review']); //handle select2 ajax search add_action('wp_ajax_eael_select2_search_post', [$this, 'select2_ajax_posts_filter_autocomplete']); add_action('wp_ajax_nopriv_eael_select2_search_post', [$this, 'select2_ajax_posts_filter_autocomplete']); add_action('wp_ajax_eael_select2_get_title', [$this, 'select2_ajax_get_posts_value_titles']); add_action('wp_ajax_nopriv_eael_select2_get_title', [$this, 'select2_ajax_get_posts_value_titles']); //handle typeform auth token add_action('admin_post_nopriv_typeform_token_data', [$this, 'typeform_auth_handle']); // Elements add_action('elementor/controls/controls_registered', array($this, 'register_controls')); add_action('elementor/elements/categories_registered', array($this, 'register_widget_categories')); add_action('elementor/widgets/widgets_registered', array($this, 'register_elements')); add_filter('elementor/editor/localize_settings', [$this, 'promote_pro_elements']); add_action('wp_footer', [$this, 'render_global_html']); // Controls add_action('eael/controls/query', [$this, 'query'], 10, 1); add_action('eael/controls/betterdocs/query', [$this, 'betterdocs_query'], 10, 1); add_action('eael/controls/layout', [$this, 'layout'], 10, 1); add_action('eael/controls/terms_style', [$this, 'terms_style'], 10, 1); add_action('eael/controls/read_more_button_style', [$this, 'read_more_button_style'], 10, 1); add_action('eael/controls/load_more_button_style', [$this, 'load_more_button_style'], 10, 1); add_action('eael/controls/custom_positioning', [$this, 'custom_positioning'], 10, 5); add_filter('eael/controls/event-calendar/source', [$this, 'event_calendar_source']); add_action('eael/controls/advanced-data-table/source', [$this, 'advanced_data_table_source']); // Login | Register add_action('init', [$this, 'login_or_register_user']); add_filter('wp_new_user_notification_email', array($this, 'new_user_notification_email'), 10, 3); add_filter('wp_new_user_notification_email_admin', array($this, 'new_user_notification_email_admin'), 10, 3); //rank math support add_filter('rank_math/researches/toc_plugins', [$this, 'toc_rank_math_support']); // Admin if (is_admin()) { // Admin if (!$this->pro_enabled) { $this->admin_notice(); } else { new WPDeveloper_Core_Installer( basename( EAEL_PLUGIN_BASENAME, '.php' ) ); } add_action('admin_menu', array($this, 'admin_menu')); add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts')); add_action('wp_ajax_save_settings_with_ajax', array($this, 'save_settings')); add_action('wp_ajax_clear_cache_files_with_ajax', array($this, 'clear_cache_files')); // Core add_filter('plugin_action_links_' . EAEL_PLUGIN_BASENAME, array($this, 'insert_plugin_links')); add_filter('plugin_row_meta', array($this, 'insert_plugin_row_meta'), 10, 2); // removed activation redirection temporarily // add_action('admin_init', array($this, 'redirect_on_activation')); if (!did_action('elementor/loaded')) { add_action('admin_notices', array($this, 'elementor_not_loaded')); } // On Editor - Register WooCommerce frontend hooks before the Editor init. // Priority = 5, in order to allow plugins remove/add their wc hooks on init. if (!empty($_REQUEST['action']) && 'elementor' === $_REQUEST['action']) { add_action('init', [$this, 'register_wc_hooks'], 5); } } } }
[+]
..
[+]
WPML
[-] WPDeveloper_Core_Installer.php
[edit]
[-] Migration.php
[edit]
[-] Bootstrap.php
[edit]
[-] Helper.php
[edit]
[-] WPDeveloper_Notice.php
[edit]
[-] Plugin_Usage_Tracker.php
[edit]