essential-addons-for-elementor-lite
Last commit date
assets
1 week ago
includes
1 week ago
languages
1 week ago
vendor
3 weeks ago
autoload.php
1 month ago
config.php
1 month ago
essential_adons_elementor.php
1 week ago
index.php
3 years ago
readme.txt
1 week ago
wpml-config.xml
1 month ago
essential_adons_elementor.php
150 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: Essential Addons for Elementor |
| 4 | * Description: The Essential plugin you install after Elementor! Packed with 100+ stunning elements like Data Table, Event Calendar, Filterable Gallery, WooCommerce. |
| 5 | * Plugin URI: https://essential-addons.com/ |
| 6 | * Author: WPDeveloper |
| 7 | * Version: 6.6.5 |
| 8 | * Author URI: https://wpdeveloper.com/ |
| 9 | * Text Domain: essential-addons-for-elementor-lite |
| 10 | * Domain Path: /languages |
| 11 | * |
| 12 | * WC tested up to: 10.0 |
| 13 | * Elementor tested up to: 4.0 |
| 14 | * Elementor Pro tested up to: 4.0 |
| 15 | */ |
| 16 | |
| 17 | if ( ! defined( 'ABSPATH' ) ) { |
| 18 | exit; |
| 19 | } // Exit if accessed directly |
| 20 | |
| 21 | /** |
| 22 | * Defining plugin constants. |
| 23 | * |
| 24 | * @since 3.0.0 |
| 25 | */ |
| 26 | define( 'EAEL_PLUGIN_FILE', __FILE__ ); |
| 27 | define( 'EAEL_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); |
| 28 | define( 'EAEL_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); |
| 29 | define( 'EAEL_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) ); |
| 30 | define( 'EAEL_PLUGIN_VERSION', '6.6.5' ); |
| 31 | define( 'EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . '/essential-addons-elementor' ); |
| 32 | define( 'EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor' ); |
| 33 | /** |
| 34 | * Including composer autoloader globally. |
| 35 | * |
| 36 | * @since 3.0.0 |
| 37 | */ |
| 38 | require_once EAEL_PLUGIN_PATH . 'autoload.php'; |
| 39 | |
| 40 | /** |
| 41 | * Including plugin config. |
| 42 | * |
| 43 | * @since 3.0.0 |
| 44 | */ |
| 45 | $GLOBALS['eael_config'] = require_once EAEL_PLUGIN_PATH . 'config.php'; |
| 46 | |
| 47 | /** |
| 48 | * Run plugin after all others plugins |
| 49 | * |
| 50 | * @since 3.0.0 |
| 51 | */ |
| 52 | add_action( |
| 53 | 'plugins_loaded', |
| 54 | function () { |
| 55 | if ( class_exists( '\Essential_Addons_Elementor\Classes\Bootstrap' ) ) { |
| 56 | \Essential_Addons_Elementor\Classes\Bootstrap::instance(); |
| 57 | } |
| 58 | } |
| 59 | ); |
| 60 | |
| 61 | /** |
| 62 | * Plugin migrator |
| 63 | * |
| 64 | * @since v3.0.0 |
| 65 | */ |
| 66 | add_action( |
| 67 | 'wp_loaded', |
| 68 | function () { |
| 69 | if ( class_exists( '\Essential_Addons_Elementor\Classes\Migration' ) ) { |
| 70 | $migration = new \Essential_Addons_Elementor\Classes\Migration(); |
| 71 | $migration->migrator(); |
| 72 | } |
| 73 | } |
| 74 | ); |
| 75 | |
| 76 | /** |
| 77 | * Activation hook |
| 78 | * |
| 79 | * @since v3.0.0 |
| 80 | */ |
| 81 | register_activation_hook( |
| 82 | __FILE__, |
| 83 | function () { |
| 84 | if ( class_exists( '\Essential_Addons_Elementor\Classes\Migration' ) ) { |
| 85 | $migration = new \Essential_Addons_Elementor\Classes\Migration(); |
| 86 | $migration->plugin_activation_hook(); |
| 87 | } |
| 88 | } |
| 89 | ); |
| 90 | |
| 91 | /** |
| 92 | * Deactivation hook |
| 93 | * |
| 94 | * @since v3.0.0 |
| 95 | */ |
| 96 | register_deactivation_hook( |
| 97 | __FILE__, |
| 98 | function () { |
| 99 | if ( class_exists( '\Essential_Addons_Elementor\Classes\Migration' ) ) { |
| 100 | $migration = new \Essential_Addons_Elementor\Classes\Migration(); |
| 101 | $migration->plugin_deactivation_hook(); |
| 102 | } |
| 103 | } |
| 104 | ); |
| 105 | |
| 106 | /** |
| 107 | * Upgrade hook |
| 108 | * |
| 109 | * @since v3.0.0 |
| 110 | */ |
| 111 | add_action( |
| 112 | 'upgrader_process_complete', |
| 113 | function ( $upgrader_object, $options ) { |
| 114 | if ( class_exists( '\Essential_Addons_Elementor\Classes\Migration' ) ) { |
| 115 | $migration = new \Essential_Addons_Elementor\Classes\Migration(); |
| 116 | $migration->plugin_upgrade_hook( $upgrader_object, $options ); |
| 117 | } |
| 118 | }, |
| 119 | 10, |
| 120 | 2 |
| 121 | ); |
| 122 | |
| 123 | add_action( |
| 124 | 'wp_loaded', |
| 125 | function () { |
| 126 | $setup_wizard = get_option( 'eael_setup_wizard' ); |
| 127 | if ( $setup_wizard === 'redirect' ) { |
| 128 | \Essential_Addons_Elementor\Classes\WPDeveloper_Setup_Wizard::redirect(); |
| 129 | } |
| 130 | |
| 131 | if ( $setup_wizard === 'init' ) { |
| 132 | new \Essential_Addons_Elementor\Classes\WPDeveloper_Setup_Wizard(); |
| 133 | } |
| 134 | } |
| 135 | ); |
| 136 | |
| 137 | /** |
| 138 | * WooCommerce HPOS Support |
| 139 | * |
| 140 | * @since v5.8.2 |
| 141 | */ |
| 142 | add_action( |
| 143 | 'before_woocommerce_init', |
| 144 | function () { |
| 145 | if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { |
| 146 | \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); |
| 147 | } |
| 148 | } |
| 149 | ); |
| 150 |