| 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.13.0-beta1 |
| 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.13.0-beta1' ); |
| 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 |
add_action( 'plugins_loaded', 'elementor_load_plugin_textdomain' ); |
| 47 |
|
| 48 |
if ( ! version_compare( PHP_VERSION, '7.0', '>=' ) ) { |
| 49 |
add_action( 'admin_notices', 'elementor_fail_php_version' ); |
| 50 |
} elseif ( ! version_compare( get_bloginfo( 'version' ), '5.9', '>=' ) ) { |
| 51 |
add_action( 'admin_notices', 'elementor_fail_wp_version' ); |
| 52 |
} else { |
| 53 |
require ELEMENTOR_PATH . 'includes/plugin.php'; |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* Load Elementor textdomain. |
| 58 |
* |
| 59 |
* Load gettext translate for Elementor text domain. |
| 60 |
* |
| 61 |
* @since 1.0.0 |
| 62 |
* |
| 63 |
* @return void |
| 64 |
*/ |
| 65 |
function elementor_load_plugin_textdomain() { |
| 66 |
load_plugin_textdomain( 'elementor' ); |
| 67 |
} |
| 68 |
|
| 69 |
/** |
| 70 |
* Elementor admin notice for minimum PHP version. |
| 71 |
* |
| 72 |
* Warning when the site doesn't have the minimum required PHP version. |
| 73 |
* |
| 74 |
* @since 1.0.0 |
| 75 |
* |
| 76 |
* @return void |
| 77 |
*/ |
| 78 |
function elementor_fail_php_version() { |
| 79 |
$message = sprintf( |
| 80 |
/* translators: 1: `<h3>` opening tag, 2: `</h3>` closing tag, 3: PHP version. 4: Link opening tag, 5: Link closing tag. */ |
| 81 |
esc_html__( '%1$sElementor isn’t running because PHP is outdated.%2$s Update to PHP version %3$s and get back to creating! %4$sShow me how%5$s', 'elementor' ), |
| 82 |
'<h3>', |
| 83 |
'</h3>', |
| 84 |
'7.0', |
| 85 |
'<a href="https://go.elementor.com/wp-dash-update-php/" target="_blank">', |
| 86 |
'</a>' |
| 87 |
); |
| 88 |
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) ); |
| 89 |
echo wp_kses_post( $html_message ); |
| 90 |
} |
| 91 |
|
| 92 |
/** |
| 93 |
* Elementor admin notice for minimum WordPress version. |
| 94 |
* |
| 95 |
* Warning when the site doesn't have the minimum required WordPress version. |
| 96 |
* |
| 97 |
* @since 1.5.0 |
| 98 |
* |
| 99 |
* @return void |
| 100 |
*/ |
| 101 |
function elementor_fail_wp_version() { |
| 102 |
$message = sprintf( |
| 103 |
/* translators: 1: `<h3>` opening tag, 2: `</h3>` closing tag, 3: WP version. 4: Link opening tag, 5: Link closing tag. */ |
| 104 |
esc_html__( '%1$sElementor isn’t running because WordPress is outdated.%2$s Update to version %3$s and get back to creating! %4$sShow me how%5$s', 'elementor' ), |
| 105 |
'<h3>', |
| 106 |
'</h3>', |
| 107 |
'5.9', |
| 108 |
'<a href="https://go.elementor.com/wp-dash-update-wordpress/" target="_blank">', |
| 109 |
'</a>' |
| 110 |
); |
| 111 |
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) ); |
| 112 |
echo wp_kses_post( $html_message ); |
| 113 |
} |
| 114 |
|