elementor
Last commit date
app
3 years ago
assets
3 years ago
core
3 years ago
data
4 years ago
includes
3 years ago
modules
3 years ago
packages
3 years ago
elementor.php
3 years ago
license.txt
9 years ago
readme.txt
3 years ago
elementor.php
101 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.8.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.8.1' ); |
| 31 | define( 'ELEMENTOR_PREVIOUS_STABLE_VERSION', '3.1.4' ); |
| 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 | add_action( 'plugins_loaded', 'elementor_load_plugin_textdomain' ); |
| 48 | |
| 49 | if ( ! version_compare( PHP_VERSION, '7.0', '>=' ) ) { |
| 50 | add_action( 'admin_notices', 'elementor_fail_php_version' ); |
| 51 | } elseif ( ! version_compare( get_bloginfo( 'version' ), '5.2', '>=' ) ) { |
| 52 | add_action( 'admin_notices', 'elementor_fail_wp_version' ); |
| 53 | } else { |
| 54 | require ELEMENTOR_PATH . 'includes/plugin.php'; |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Load Elementor textdomain. |
| 59 | * |
| 60 | * Load gettext translate for Elementor text domain. |
| 61 | * |
| 62 | * @since 1.0.0 |
| 63 | * |
| 64 | * @return void |
| 65 | */ |
| 66 | function elementor_load_plugin_textdomain() { |
| 67 | load_plugin_textdomain( 'elementor' ); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Elementor admin notice for minimum PHP version. |
| 72 | * |
| 73 | * Warning when the site doesn't have the minimum required PHP version. |
| 74 | * |
| 75 | * @since 1.0.0 |
| 76 | * |
| 77 | * @return void |
| 78 | */ |
| 79 | function elementor_fail_php_version() { |
| 80 | /* translators: %s: PHP version. */ |
| 81 | $message = sprintf( esc_html__( 'Elementor requires PHP version %s+, plugin is currently NOT RUNNING.', 'elementor' ), '7.0' ); |
| 82 | $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) ); |
| 83 | echo wp_kses_post( $html_message ); |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * Elementor admin notice for minimum WordPress version. |
| 88 | * |
| 89 | * Warning when the site doesn't have the minimum required WordPress version. |
| 90 | * |
| 91 | * @since 1.5.0 |
| 92 | * |
| 93 | * @return void |
| 94 | */ |
| 95 | function elementor_fail_wp_version() { |
| 96 | /* translators: %s: WordPress version. */ |
| 97 | $message = sprintf( esc_html__( 'Elementor requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'elementor' ), '5.2' ); |
| 98 | $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) ); |
| 99 | echo wp_kses_post( $html_message ); |
| 100 | } |
| 101 |