PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.0
Elementor Website Builder – more than just a page builder v4.2.0
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / elementor.php

elementor.php in Elementor Website Builder – more than just a page builder 4.2.0, at elementor.php

123 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Elementor
4 * Description: The Elementor Website Builder has it all: drag and drop page builder, Atomic Editor, pixel perfect design, global and reusable style systems, 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.2.0
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.8
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.2.0' );
32 define( 'ELEMENTOR_MINIMUM_WP_VERSION', '6.8' );
33
34 define( 'ELEMENTOR__FILE__', __FILE__ );
35 define( 'ELEMENTOR_PLUGIN_BASE', plugin_basename( ELEMENTOR__FILE__ ) );
36 define( 'ELEMENTOR_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) );
37
38 if ( defined( 'ELEMENTOR_TESTS' ) && ELEMENTOR_TESTS ) {
39 define( 'ELEMENTOR_URL', 'file://' . ELEMENTOR_PATH );
40 } else {
41 define( 'ELEMENTOR_URL', plugins_url( '/', ELEMENTOR__FILE__ ) );
42 }
43
44 define( 'ELEMENTOR_MODULES_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) . '/modules' );
45 define( 'ELEMENTOR_ASSETS_PATH', ELEMENTOR_PATH . 'assets/' );
46 define( 'ELEMENTOR_ASSETS_URL', ELEMENTOR_URL . 'assets/' );
47
48 if ( ! defined( 'ELEMENTOR_EDITOR_EVENTS_MIXPANEL_TOKEN' ) ) {
49 define( 'ELEMENTOR_EDITOR_EVENTS_MIXPANEL_TOKEN', '150605b3b9f979922f2ac5a52e2dcfe9' );
50 }
51
52 if ( file_exists( ELEMENTOR_PATH . 'vendor/autoload.php' ) ) {
53 require_once ELEMENTOR_PATH . 'vendor/autoload.php';
54 // We need this file because of the DI\create function that we are using.
55 // Autoload classmap doesn't include this file.
56 }
57
58 $deprecation_func_file = ELEMENTOR_PATH . 'vendor_prefixed/twig/symfony/deprecation-contracts/function.php';
59 if ( file_exists( $deprecation_func_file ) ) {
60 require_once $deprecation_func_file;
61 if ( ! function_exists( 'trigger_deprecation' ) ) {
62 function trigger_deprecation( string $package, string $version, string $message, ...$args ): void {
63 \ElementorDeps\trigger_deprecation( $package, $version, $message, ...$args );
64 }
65 }
66 }
67
68 if ( ! version_compare( PHP_VERSION, '7.4', '>=' ) ) {
69 add_action( 'admin_notices', 'elementor_fail_php_version' );
70 } elseif ( ! version_compare( get_bloginfo( 'version' ), ELEMENTOR_MINIMUM_WP_VERSION, '>=' ) ) {
71 add_action( 'admin_notices', 'elementor_fail_wp_version' );
72 } else {
73 require ELEMENTOR_PATH . 'includes/plugin.php';
74 }
75
76 /**
77 * Elementor admin notice for minimum PHP version.
78 *
79 * Warning when the site doesn't have the minimum required PHP version.
80 *
81 * @since 1.0.0
82 *
83 * @return void
84 */
85 function elementor_fail_php_version() {
86 $html_message = sprintf(
87 '<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>',
88 esc_html__( 'Elementor isn’t running because PHP is outdated.', 'elementor' ),
89 sprintf(
90 /* translators: %s: PHP version. */
91 esc_html__( 'Update to version %s and get back to creating!', 'elementor' ),
92 '7.4'
93 ),
94 esc_html__( 'Show me how', 'elementor' )
95 );
96
97 echo wp_kses_post( $html_message );
98 }
99
100 /**
101 * Elementor admin notice for minimum WordPress version.
102 *
103 * Warning when the site doesn't have the minimum required WordPress version.
104 *
105 * @since 1.5.0
106 *
107 * @return void
108 */
109 function elementor_fail_wp_version() {
110 $html_message = sprintf(
111 '<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>',
112 esc_html__( 'Elementor isn’t running because WordPress is outdated.', 'elementor' ),
113 sprintf(
114 /* translators: %s: WordPress version. */
115 esc_html__( 'Update to version %s and get back to creating!', 'elementor' ),
116 ELEMENTOR_MINIMUM_WP_VERSION
117 ),
118 esc_html__( 'Show me how', 'elementor' )
119 );
120
121 echo wp_kses_post( $html_message );
122 }
123