PluginProbe
Elementor Website Builder – more than just a page builder / 3.32.1
Elementor Website Builder – more than just a page builder v3.32.1
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 +2 -34 4.2.23.32.1 View file →
@@ -5,18 +5,12 @@
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 -use Elementor\Modules\Variables\PropTypes\Color_Variable_Prop_Type;
11 -use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type;
12 -use Elementor\Modules\Variables\PropTypes\Size_Variable_Prop_Type;
13 -use Elementor\Modules\Variables\Storage\Constants;
14 9 use Elementor\Plugin;
15 -use Elementor\Utils;
16 10
17 11 if ( ! defined( 'ABSPATH' ) ) {
18 - exit;
12 + exit; // Exit if accessed directly.
19 13 }
20 14
21 15 class Module extends BaseModule {
22 16 const MODULE_NAME = 'e-variables';
@@ -53,13 +47,9 @@
53 47 $this->register_features();
54 48
55 49 $this->hooks()->register();
56 50
57 - ( new Import_Export_Customization() )->register_hooks();
58 -
59 51 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 - add_action( 'elementor/editor/before_enqueue_scripts', fn () => $this->enqueue_editor_scripts() );
62 52 }
63 53
64 54 private function register_features() {
65 55 Plugin::$instance->experiments->add_feature([
@@ -66,9 +56,9 @@
66 56 'name' => self::EXPERIMENT_MANAGER_NAME,
67 57 'title' => esc_html__( 'Variables Manager', 'elementor' ),
68 58 'description' => esc_html__( 'Enable variables manager. (For this feature to work - Variables must be active)', 'elementor' ),
69 59 'hidden' => true,
70 - 'default' => ExperimentsManager::STATE_ACTIVE,
60 + 'default' => ExperimentsManager::STATE_INACTIVE,
71 61 'release_status' => ExperimentsManager::RELEASE_STATUS_ALPHA,
72 62 ]);
73 63 }
74 64
@@ -85,28 +75,6 @@
85 75
86 76
87 77 public function get_variable_types_registry(): Variable_Types_Registry {
88 78 return $this->variable_types_registry;
89 - }
90 -
91 - private function get_quota_config(): array {
92 - return [
93 - Color_Variable_Prop_Type::get_key() => 100000,
94 - Font_Variable_Prop_Type::get_key() => 100000,
95 - ];
96 - }
97 -
98 - public function enqueue_editor_scripts() {
99 -
100 - wp_add_inline_script(
101 - 'elementor-common',
102 - 'window.ElementorVariablesQuotaConfig = ' . wp_json_encode( $this->get_quota_config() ) . ';',
103 - 'before'
104 - );
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 79 }
112 80 }