essential-addons-for-elementor-lite
Last commit date
assets
5 years ago
includes
5 years ago
languages
5 years ago
autoload.php
5 years ago
config.php
5 years ago
essential_adons_elementor.php
5 years ago
readme.txt
5 years ago
essential_adons_elementor.php
93 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: Essential Addons for Elementor |
| 4 | * Description: The Essential plugin you install after Elementor! Packed with 40+ stunning free elements including Advanced Data Table, Event Calendar, Filterable Gallery, WooCommerce, and many more. |
| 5 | * Plugin URI: https://essential-addons.com/elementor/ |
| 6 | * Author: WPDeveloper |
| 7 | * Version: 4.3.3 |
| 8 | * Author URI: https://wpdeveloper.net/ |
| 9 | * Text Domain: essential-addons-for-elementor-lite |
| 10 | * Domain Path: /languages |
| 11 | * |
| 12 | * WC tested up to: 4.4.1 |
| 13 | */ |
| 14 | |
| 15 | if (!defined('ABSPATH')) { |
| 16 | exit; |
| 17 | } // Exit if accessed directly |
| 18 | |
| 19 | /** |
| 20 | * Defining plugin constants. |
| 21 | * |
| 22 | * @since 3.0.0 |
| 23 | */ |
| 24 | define('EAEL_PLUGIN_FILE', __FILE__); |
| 25 | define('EAEL_PLUGIN_BASENAME', plugin_basename(__FILE__)); |
| 26 | define('EAEL_PLUGIN_PATH', trailingslashit(plugin_dir_path(__FILE__))); |
| 27 | define('EAEL_PLUGIN_URL', trailingslashit(plugins_url('/', __FILE__))); |
| 28 | define('EAEL_PLUGIN_VERSION', '4.3.3'); |
| 29 | define('EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . '/essential-addons-elementor'); |
| 30 | define('EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor'); |
| 31 | /** |
| 32 | * Including composer autoloader globally. |
| 33 | * |
| 34 | * @since 3.0.0 |
| 35 | */ |
| 36 | require_once EAEL_PLUGIN_PATH . 'autoload.php'; |
| 37 | |
| 38 | /** |
| 39 | * Including plugin config. |
| 40 | * |
| 41 | * @since 3.0.0 |
| 42 | */ |
| 43 | $GLOBALS['eael_config'] = require_once EAEL_PLUGIN_PATH . 'config.php'; |
| 44 | |
| 45 | /** |
| 46 | * Run plugin after all others plugins |
| 47 | * |
| 48 | * @since 3.0.0 |
| 49 | */ |
| 50 | add_action('plugins_loaded', function () { |
| 51 | \Essential_Addons_Elementor\Classes\Bootstrap::instance(); |
| 52 | }); |
| 53 | |
| 54 | /** |
| 55 | * Plugin migrator |
| 56 | * |
| 57 | * @since v3.0.0 |
| 58 | */ |
| 59 | add_action('wp_loaded', function () { |
| 60 | $migration = new \Essential_Addons_Elementor\Classes\Migration; |
| 61 | $migration->migrator(); |
| 62 | }); |
| 63 | |
| 64 | /** |
| 65 | * Activation hook |
| 66 | * |
| 67 | * @since v3.0.0 |
| 68 | */ |
| 69 | register_activation_hook(__FILE__, function () { |
| 70 | $migration = new \Essential_Addons_Elementor\Classes\Migration; |
| 71 | $migration->plugin_activation_hook(); |
| 72 | }); |
| 73 | |
| 74 | /** |
| 75 | * Deactivation hook |
| 76 | * |
| 77 | * @since v3.0.0 |
| 78 | */ |
| 79 | register_deactivation_hook(__FILE__, function () { |
| 80 | $migration = new \Essential_Addons_Elementor\Classes\Migration; |
| 81 | $migration->plugin_deactivation_hook(); |
| 82 | }); |
| 83 | |
| 84 | /** |
| 85 | * Upgrade hook |
| 86 | * |
| 87 | * @since v3.0.0 |
| 88 | */ |
| 89 | add_action('upgrader_process_complete', function ($upgrader_object, $options) { |
| 90 | $migration = new \Essential_Addons_Elementor\Classes\Migration; |
| 91 | $migration->plugin_upgrade_hook($upgrader_object, $options); |
| 92 | }, 10, 2); |
| 93 |