elementor
Last commit date
app
1 year ago
assets
1 year ago
core
1 year ago
data
1 year ago
includes
1 year ago
modules
1 year ago
vendor
1 year ago
vendor_prefixed
1 year ago
changelog.txt
1 year ago
elementor.php
1 year ago
license.txt
3 years ago
readme.txt
1 year ago
run-on-linux.js
1 year ago
elementor.php
108 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 | * Author: Elementor.com |
| 7 | * Version: 3.27.1 |
| 8 | * Author URI: https://elementor.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash |
| 9 | * |
| 10 | * Text Domain: elementor |
| 11 | * |
| 12 | * @package Elementor |
| 13 | * @category Core |
| 14 | * |
| 15 | * Elementor is free software: you can redistribute it and/or modify |
| 16 | * it under the terms of the GNU General Public License as published by |
| 17 | * the Free Software Foundation, either version 3 of the License, or |
| 18 | * any later version. |
| 19 | * |
| 20 | * Elementor is distributed in the hope that it will be useful, |
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | * GNU General Public License for more details. |
| 24 | */ |
| 25 | |
| 26 | if ( ! defined( 'ABSPATH' ) ) { |
| 27 | exit; // Exit if accessed directly. |
| 28 | } |
| 29 | |
| 30 | define( 'ELEMENTOR_VERSION', '3.27.1' ); |
| 31 | |
| 32 | define( 'ELEMENTOR__FILE__', __FILE__ ); |
| 33 | define( 'ELEMENTOR_PLUGIN_BASE', plugin_basename( ELEMENTOR__FILE__ ) ); |
| 34 | define( 'ELEMENTOR_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) ); |
| 35 | |
| 36 | if ( defined( 'ELEMENTOR_TESTS' ) && ELEMENTOR_TESTS ) { |
| 37 | define( 'ELEMENTOR_URL', 'file://' . ELEMENTOR_PATH ); |
| 38 | } else { |
| 39 | define( 'ELEMENTOR_URL', plugins_url( '/', ELEMENTOR__FILE__ ) ); |
| 40 | } |
| 41 | |
| 42 | define( 'ELEMENTOR_MODULES_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) . '/modules' ); |
| 43 | define( 'ELEMENTOR_ASSETS_PATH', ELEMENTOR_PATH . 'assets/' ); |
| 44 | define( 'ELEMENTOR_ASSETS_URL', ELEMENTOR_URL . 'assets/' ); |
| 45 | |
| 46 | if ( file_exists( ELEMENTOR_PATH . 'vendor/autoload.php' ) ) { |
| 47 | require_once ELEMENTOR_PATH . 'vendor/autoload.php'; |
| 48 | // We need this file because of the DI\create function that we are using. |
| 49 | // Autoload classmap doesn't include this file. |
| 50 | require_once ELEMENTOR_PATH . 'vendor_prefixed/php-di/php-di/src/functions.php'; |
| 51 | } |
| 52 | |
| 53 | if ( ! version_compare( PHP_VERSION, '7.4', '>=' ) ) { |
| 54 | add_action( 'admin_notices', 'elementor_fail_php_version' ); |
| 55 | } elseif ( ! version_compare( get_bloginfo( 'version' ), '6.3', '>=' ) ) { |
| 56 | add_action( 'admin_notices', 'elementor_fail_wp_version' ); |
| 57 | } else { |
| 58 | require ELEMENTOR_PATH . 'includes/plugin.php'; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Elementor admin notice for minimum PHP version. |
| 63 | * |
| 64 | * Warning when the site doesn't have the minimum required PHP version. |
| 65 | * |
| 66 | * @since 1.0.0 |
| 67 | * |
| 68 | * @return void |
| 69 | */ |
| 70 | function elementor_fail_php_version() { |
| 71 | $html_message = sprintf( |
| 72 | '<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>', |
| 73 | esc_html__( 'Elementor isn’t running because PHP is outdated.', 'elementor' ), |
| 74 | sprintf( |
| 75 | /* translators: %s: PHP version. */ |
| 76 | esc_html__( 'Update to version %s and get back to creating!', 'elementor' ), |
| 77 | '7.4' |
| 78 | ), |
| 79 | esc_html__( 'Show me how', 'elementor' ) |
| 80 | ); |
| 81 | |
| 82 | echo wp_kses_post( $html_message ); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Elementor admin notice for minimum WordPress version. |
| 87 | * |
| 88 | * Warning when the site doesn't have the minimum required WordPress version. |
| 89 | * |
| 90 | * @since 1.5.0 |
| 91 | * |
| 92 | * @return void |
| 93 | */ |
| 94 | function elementor_fail_wp_version() { |
| 95 | $html_message = sprintf( |
| 96 | '<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>', |
| 97 | esc_html__( 'Elementor isn’t running because WordPress is outdated.', 'elementor' ), |
| 98 | sprintf( |
| 99 | /* translators: %s: WordPress version. */ |
| 100 | esc_html__( 'Update to version %s and get back to creating!', 'elementor' ), |
| 101 | '6.3' |
| 102 | ), |
| 103 | esc_html__( 'Show me how', 'elementor' ) |
| 104 | ); |
| 105 | |
| 106 | echo wp_kses_post( $html_message ); |
| 107 | } |
| 108 |