elementor.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * Plugin Name: Elementor
  4. * Description: The most advanced frontend drag & drop page builder. Create high-end, pixel perfect websites at record speeds. Any theme, any page, any design.
  5. * Plugin URI: https://elementor.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
  6. * Author: Elementor.com
  7. * Version: 2.2.4
  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. if ( ! defined( 'ABSPATH' ) ) {
  26. exit; // Exit if accessed directly.
  27. }
  28. define( 'ELEMENTOR_VERSION', '2.2.4' );
  29. define( 'ELEMENTOR_PREVIOUS_STABLE_VERSION', '2.1.8' );
  30. define( 'ELEMENTOR__FILE__', __FILE__ );
  31. define( 'ELEMENTOR_PLUGIN_BASE', plugin_basename( ELEMENTOR__FILE__ ) );
  32. define( 'ELEMENTOR_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) );
  33. if ( defined( 'ELEMENTOR_TESTS' ) && ELEMENTOR_TESTS ) {
  34. define( 'ELEMENTOR_URL', 'file://' . ELEMENTOR_PATH );
  35. } else {
  36. define( 'ELEMENTOR_URL', plugins_url( '/', ELEMENTOR__FILE__ ) );
  37. }
  38. define( 'ELEMENTOR_MODULES_PATH', plugin_dir_path( ELEMENTOR__FILE__ ) . '/modules' );
  39. define( 'ELEMENTOR_ASSETS_PATH', ELEMENTOR_PATH . 'assets/' );
  40. define( 'ELEMENTOR_ASSETS_URL', ELEMENTOR_URL . 'assets/' );
  41. add_action( 'plugins_loaded', 'elementor_load_plugin_textdomain' );
  42. if ( ! version_compare( PHP_VERSION, '5.4', '>=' ) ) {
  43. add_action( 'admin_notices', 'elementor_fail_php_version' );
  44. } elseif ( ! version_compare( get_bloginfo( 'version' ), '4.7', '>=' ) ) {
  45. add_action( 'admin_notices', 'elementor_fail_wp_version' );
  46. } else {
  47. require( ELEMENTOR_PATH . 'includes/plugin.php' );
  48. }
  49. /**
  50. * Load Elementor textdomain.
  51. *
  52. * Load gettext translate for Elementor text domain.
  53. *
  54. * @since 1.0.0
  55. *
  56. * @return void
  57. */
  58. function elementor_load_plugin_textdomain() {
  59. load_plugin_textdomain( 'elementor' );
  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. /* translators: %s: PHP version */
  72. $message = sprintf( esc_html__( 'Elementor requires PHP version %s+, plugin is currently NOT RUNNING.', 'elementor' ), '5.4' );
  73. $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
  74. echo wp_kses_post( $html_message );
  75. }
  76. /**
  77. * Elementor admin notice for minimum WordPress version.
  78. *
  79. * Warning when the site doesn't have the minimum required WordPress version.
  80. *
  81. * @since 1.5.0
  82. *
  83. * @return void
  84. */
  85. function elementor_fail_wp_version() {
  86. /* translators: %s: WordPress version */
  87. $message = sprintf( esc_html__( 'Elementor requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT RUNNING.', 'elementor' ), '4.7' );
  88. $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
  89. echo wp_kses_post( $html_message );
  90. }