elementor
Last commit date
app
2 months ago
assets
2 months ago
core
2 months ago
data
7 months ago
includes
2 months ago
migrations
2 months ago
modules
2 months ago
vendor
2 months ago
vendor_prefixed
8 months ago
CONTRIBUTING.md
2 months ago
changelog.txt
2 months ago
elementor.php
2 months ago
license.txt
3 years ago
readme.txt
2 months ago
turbo.json
2 months ago
elementor.php
122 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: Elementor |
| 4 | * Description: The Elementor Website Builder has it all: drag and drop page builder, pixel perfect design, mobile responsive editing, and more. Get started now! |
| 5 | * Plugin URI: https://elementor.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash |
| 6 | * Version: 4.0.0-dev3 |
| 7 | * Author: Elementor.com |
| 8 | * Author URI: https://elementor.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash |
| 9 | * Requires PHP: 7.4 |
| 10 | * Requires at least: 6.6 |
| 11 | * Text Domain: elementor |
| 12 | * |
| 13 | * @package Elementor |
| 14 | * @category Core |
| 15 | * |
| 16 | * Elementor is free software: you can redistribute it and/or modify |
| 17 | * it under the terms of the GNU General Public License as published by |
| 18 | * the Free Software Foundation, either version 3 of the License, or |
| 19 | * any later version. |
| 20 | * |
| 21 | * Elementor is distributed in the hope that it will be useful, |
| 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | * GNU General Public License for more details. |
| 25 | */ |
| 26 | |
| 27 | if ( ! defined( 'ABSPATH' ) ) { |
| 28 | exit; // Exit if accessed directly. |
| 29 | } |
| 30 | |
| 31 | define( 'ELEMENTOR_VERSION', '4.0.0-dev3' ); |
| 32 | |
| 33 | define( 'ELEMENTOR__FILE__', __FILE__ ); |
| 34 | define( 'ELEMENTOR_PLUGIN_BASE', plugin_basename( ELEMENTOR__FILE__ ) ); |
| 35 | define( 'ELEMENTOR_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) ); |
| 36 | |
| 37 | if ( defined( 'ELEMENTOR_TESTS' ) && ELEMENTOR_TESTS ) { |
| 38 | define( 'ELEMENTOR_URL', 'file://' . ELEMENTOR_PATH ); |
| 39 | } else { |
| 40 | define( 'ELEMENTOR_URL', plugins_url( '/', ELEMENTOR__FILE__ ) ); |
| 41 | } |
| 42 | |
| 43 | define( 'ELEMENTOR_MODULES_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) . '/modules' ); |
| 44 | define( 'ELEMENTOR_ASSETS_PATH', ELEMENTOR_PATH . 'assets/' ); |
| 45 | define( 'ELEMENTOR_ASSETS_URL', ELEMENTOR_URL . 'assets/' ); |
| 46 | |
| 47 | if ( ! defined( 'ELEMENTOR_EDITOR_EVENTS_MIXPANEL_TOKEN' ) ) { |
| 48 | define( 'ELEMENTOR_EDITOR_EVENTS_MIXPANEL_TOKEN', '150605b3b9f979922f2ac5a52e2dcfe9' ); |
| 49 | } |
| 50 | |
| 51 | if ( file_exists( ELEMENTOR_PATH . 'vendor/autoload.php' ) ) { |
| 52 | require_once ELEMENTOR_PATH . 'vendor/autoload.php'; |
| 53 | // We need this file because of the DI\create function that we are using. |
| 54 | // Autoload classmap doesn't include this file. |
| 55 | } |
| 56 | |
| 57 | $deprecation_func_file = ELEMENTOR_PATH . 'vendor_prefixed/twig/symfony/deprecation-contracts/function.php'; |
| 58 | if ( file_exists( $deprecation_func_file ) ) { |
| 59 | require_once $deprecation_func_file; |
| 60 | if ( ! function_exists( 'trigger_deprecation' ) ) { |
| 61 | function trigger_deprecation( string $package, string $version, string $message, ...$args ): void { |
| 62 | \ElementorDeps\trigger_deprecation( $package, $version, $message, ...$args ); |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | if ( ! version_compare( PHP_VERSION, '7.4', '>=' ) ) { |
| 68 | add_action( 'admin_notices', 'elementor_fail_php_version' ); |
| 69 | } elseif ( ! version_compare( get_bloginfo( 'version' ), '6.5', '>=' ) ) { |
| 70 | add_action( 'admin_notices', 'elementor_fail_wp_version' ); |
| 71 | } else { |
| 72 | require ELEMENTOR_PATH . 'includes/plugin.php'; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Elementor admin notice for minimum PHP version. |
| 77 | * |
| 78 | * Warning when the site doesn't have the minimum required PHP version. |
| 79 | * |
| 80 | * @since 1.0.0 |
| 81 | * |
| 82 | * @return void |
| 83 | */ |
| 84 | function elementor_fail_php_version() { |
| 85 | $html_message = sprintf( |
| 86 | '<div class="error"><h3>%1$s</h3><p>%2$s <a href="https://go.elementor.com/wp-dash-update-php/" target="_blank">%3$s</a></p></div>', |
| 87 | esc_html__( 'Elementor isn’t running because PHP is outdated.', 'elementor' ), |
| 88 | sprintf( |
| 89 | /* translators: %s: PHP version. */ |
| 90 | esc_html__( 'Update to version %s and get back to creating!', 'elementor' ), |
| 91 | '7.4' |
| 92 | ), |
| 93 | esc_html__( 'Show me how', 'elementor' ) |
| 94 | ); |
| 95 | |
| 96 | echo wp_kses_post( $html_message ); |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Elementor admin notice for minimum WordPress version. |
| 101 | * |
| 102 | * Warning when the site doesn't have the minimum required WordPress version. |
| 103 | * |
| 104 | * @since 1.5.0 |
| 105 | * |
| 106 | * @return void |
| 107 | */ |
| 108 | function elementor_fail_wp_version() { |
| 109 | $html_message = sprintf( |
| 110 | '<div class="error"><h3>%1$s</h3><p>%2$s <a href="https://go.elementor.com/wp-dash-update-wordpress/" target="_blank">%3$s</a></p></div>', |
| 111 | esc_html__( 'Elementor isn’t running because WordPress is outdated.', 'elementor' ), |
| 112 | sprintf( |
| 113 | /* translators: %s: WordPress version. */ |
| 114 | esc_html__( 'Update to version %s and get back to creating!', 'elementor' ), |
| 115 | '6.5' |
| 116 | ), |
| 117 | esc_html__( 'Show me how', 'elementor' ) |
| 118 | ); |
| 119 | |
| 120 | echo wp_kses_post( $html_message ); |
| 121 | } |
| 122 |