PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.0-dev2
Elementor Website Builder – more than just a page builder v3.35.0-dev2
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
← All changes | modules/variables/module.php +5 -12 4.1.0-dev13.35.0-dev2 View file →
@@ -5,18 +5,16 @@
5 5 use Elementor\Core\Base\Module as BaseModule;
6 6 use Elementor\Core\Experiments\Manager as ExperimentsManager;
7 7 use Elementor\Modules\AtomicWidgets\Module as AtomicWidgetsModule;
8 8 use Elementor\Modules\Variables\Classes\Variable_Types_Registry;
9 -use Elementor\Modules\Variables\ImportExportCustomization\Import_Export_Customization;
10 9 use Elementor\Modules\Variables\PropTypes\Color_Variable_Prop_Type;
11 10 use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type;
12 11 use Elementor\Modules\Variables\PropTypes\Size_Variable_Prop_Type;
13 -use Elementor\Modules\Variables\Storage\Constants;
14 12 use Elementor\Plugin;
15 13 use Elementor\Utils;
16 14
17 15 if ( ! defined( 'ABSPATH' ) ) {
18 - exit;
16 + exit; // Exit if accessed directly.
19 17 }
20 18
21 19 class Module extends BaseModule {
22 20 const MODULE_NAME = 'e-variables';
@@ -53,12 +51,9 @@
53 51 $this->register_features();
54 52
55 53 $this->hooks()->register();
56 54
57 - ( new Import_Export_Customization() )->register_hooks();
58 -
59 55 add_action( 'init', [ $this, 'init_variable_types_registry' ] );
60 - add_filter( 'elementor/kit/meta_to_preserve_on_kit_import', [ $this, 'add_meta_to_preserve_on_kit_import' ] );
61 56 add_action( 'elementor/editor/before_enqueue_scripts', fn () => $this->enqueue_editor_scripts() );
62 57 }
63 58
64 59 private function register_features() {
@@ -91,12 +86,16 @@
91 86 private function get_quota_config(): array {
92 87 return [
93 88 Color_Variable_Prop_Type::get_key() => 100000,
94 89 Font_Variable_Prop_Type::get_key() => 100000,
90 + Size_Variable_Prop_Type::get_key() => 0,
95 91 ];
96 92 }
97 93
98 94 public function enqueue_editor_scripts() {
95 + if ( Utils::has_pro() ) {
96 + return;
97 + }
99 98
100 99 wp_add_inline_script(
101 100 'elementor-common',
102 101 'window.ElementorVariablesQuotaConfig = ' . wp_json_encode( $this->get_quota_config() ) . ';',
@@ -101,12 +100,6 @@
101 100 'elementor-common',
102 101 'window.ElementorVariablesQuotaConfig = ' . wp_json_encode( $this->get_quota_config() ) . ';',
103 102 'before'
104 103 );
105 - }
106 -
107 - public function add_meta_to_preserve_on_kit_import( array $meta_keys ): array {
108 - return array_merge( $meta_keys, [
109 - Constants::VARIABLES_META_KEY,
110 - ] );
111 104 }
112 105 }