| @@ -1,54 +1,49 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Plugin Name: Easy Elements | |
| 4 | - * Plugin URI: https://wpeasyelements.com/ | |
| 5 | - * Description: Provides a set of custom Elementor widgets, shortcodes, and enhancements. | |
| 6 | - * Version: 1.4.4 | |
| 7 | - * Author: Themewant | |
| 8 | - * Author URI: https://wpeasyelements.com/ | |
| 9 | - * Text Domain: easy-elements | |
| 10 | - * Domain Path: /languages | |
| 11 | - * License: GPLv2 or later | |
| 12 | - * License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| 13 | - */ | |
| 14 | - | |
| 15 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 16 | - exit; | |
| 17 | -} | |
| 18 | - | |
| 19 | -// Prevent loading the plugin twice. | |
| 20 | -if ( defined( 'EASYELEMENTS_VER' ) ) { | |
| 21 | - return; | |
| 22 | -} | |
| 23 | - | |
| 24 | -define( 'EASY_ELEMENTS_DEV', false ); | |
| 25 | -if ( defined( 'EASY_ELEMENTS_DEV' ) && true == EASY_ELEMENTS_DEV ) { | |
| 26 | - define('EASYELEMENTS_VER', '1.4.4' . time() ); | |
| 27 | -} else { | |
| 28 | - define( 'EASYELEMENTS_VER', '1.4.4' ); | |
| 29 | -} | |
| 30 | - | |
| 31 | -// Define constants | |
| 32 | -define( 'EASYELEMENTS_FILE', __FILE__ ); | |
| 33 | -define( 'EASYELEMENTS_DIR_PATH', plugin_dir_path( __FILE__ ) ); | |
| 34 | -define( 'EASYELEMENTS_DIR_URL', plugin_dir_url( __FILE__ ) ); | |
| 35 | -define( 'EASYELEMENTS_ASSETS_URL', EASYELEMENTS_DIR_URL . 'assets/' ); | |
| 36 | -define( 'EASYELEMENTS_URL', plugins_url( '/', __FILE__ ) ); | |
| 37 | -define( 'EASYELEMENTS_PATH', plugin_basename( EASYELEMENTS_FILE ) ); | |
| 38 | -define( 'EASYELEMENTS_DOMAIN', trailingslashit( 'https://wpeasyelements.com/' ) ); | |
| 39 | -define( 'EASYELEMENTS_URL_ADMIN', plugin_dir_url( __FILE__ ) ); | |
| 40 | -define( 'EASYELEMENTS_ASSETS_ADMIN', trailingslashit( EASYELEMENTS_URL_ADMIN ) ); | |
| 41 | - | |
| 42 | -if ( ! defined( 'EASY_EXTENSION_BADGE' ) ) { | |
| 43 | - define( 'EASY_EXTENSION_BADGE', '<span class="easy-extension-badge"></span>' ); | |
| 44 | -} | |
| 45 | - | |
| 46 | -require_once __DIR__ . '/vendor/autoload.php'; | |
| 47 | - | |
| 48 | -// Mini Cart AJAX handlers — load at the earliest possible point so the | |
| 49 | -// wp_ajax_* actions are registered before admin-ajax.php runs do_action(). | |
| 50 | -// On WP 6.9+ admin-ajax.php returns 400 for unregistered actions, so any | |
| 51 | -// race or load-order issue surfaces as a hard failure for the mini cart. | |
| 52 | -require_once EASYELEMENTS_DIR_PATH . 'includes/Hooks/mini-cart-ajax.php'; | |
| 53 | - | |
| 54 | -require_once EASYELEMENTS_DIR_PATH . 'base.php'; | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Plugin Name: Easy Elements | |
| 4 | + * Plugin URI: http://themewant.com/ | |
| 5 | + * Description: Provides a set of custom Elementor widgets, shortcodes, and enhancements. | |
| 6 | + * Version: 1.0.7 | |
| 7 | + * Author: Themewant | |
| 8 | + * Author URI: http://themewant.com/ | |
| 9 | + * Text Domain: easy-elements | |
| 10 | + * Domain Path: /languages | |
| 11 | + * License: GPLv2 or later | |
| 12 | + * License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
| 13 | + */ | |
| 14 | + | |
| 15 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 16 | + exit; | |
| 17 | +} | |
| 18 | + | |
| 19 | +define( 'EASYELEMENTS_VER', '1.0.7' ); | |
| 20 | + | |
| 21 | +// Define constants | |
| 22 | +define( 'EASYELEMENTS_FILE', __FILE__ ); | |
| 23 | +define( 'EASYELEMENTS_DIR_PATH', plugin_dir_path( __FILE__ ) ); | |
| 24 | +define( 'EASYELEMENTS_DIR_URL', plugin_dir_url( __FILE__ ) ); | |
| 25 | +define( 'EASYELEMENTS_ASSETS_URL', EASYELEMENTS_DIR_URL . 'assets/' ); | |
| 26 | +define( 'EASYELEMENTS_URL', plugins_url( '/', __FILE__ ) ); | |
| 27 | +define( 'EASYELEMENTS_PATH', plugin_basename( __FILE__ ) ); | |
| 28 | +define( 'EASYELEMENTS_DOMAIN', trailingslashit( 'http://themewant.com' ) ); | |
| 29 | +define( 'EASYELEMENTS_URL_ADMIN', plugin_dir_url( __FILE__ ) ); | |
| 30 | +define( 'EASYELEMENTS_ASSETS_ADMIN', trailingslashit( EASYELEMENTS_URL_ADMIN ) ); | |
| 31 | + | |
| 32 | +if ( ! defined( 'EASY_EXTENSION_BADGE' ) ) { | |
| 33 | + define( 'EASY_EXTENSION_BADGE', '<span class="easy-extension-badge"></span>' ); | |
| 34 | +} | |
| 35 | + | |
| 36 | +require_once EASYELEMENTS_DIR_PATH . 'inc/class-loader.php'; | |
| 37 | + | |
| 38 | +register_activation_hook( EASYELEMENTS_FILE, 'easy_elements_activate' ); | |
| 39 | + | |
| 40 | +function easy_elements_activate() { | |
| 41 | + flush_rewrite_rules(); | |
| 42 | +} | |
| 43 | + | |
| 44 | +add_action( 'plugins_loaded', function() { | |
| 45 | + if ( class_exists( 'Easy_Header_Footer_Elementor' ) ) { | |
| 46 | + Easy_Header_Footer_Elementor::instance(); | |
| 47 | + } | |
| 48 | +}); | |
| 49 | + | |