PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.7
Elementor Website Builder – more than just a page builder v3.35.7
4.3.0-beta3 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 All 452 releases
← All changes | modules/variables/storage/variables-repository.php +4 -2 4.2.23.35.7 View file →
@@ -5,8 +5,10 @@
5 5 use Elementor\Core\Kits\Documents\Kit;
6 6 use Elementor\Modules\Variables\Adapters\Prop_Type_Adapter;
7 7
8 8 class Variables_Repository {
9 + private const VARIABLES_META_KEY = '_elementor_global_variables';
10 +
9 11 private Kit $kit;
10 12
11 13 public function __construct( Kit $kit ) {
12 14 $this->kit = $kit;
@@ -12,9 +14,9 @@
12 14 $this->kit = $kit;
13 15 }
14 16
15 17 public function load(): Variables_Collection {
16 - $db_record = $this->kit->get_json_meta( Constants::VARIABLES_META_KEY );
18 + $db_record = $this->kit->get_json_meta( self::VARIABLES_META_KEY );
17 19
18 20 if ( is_array( $db_record ) && ! empty( $db_record ) ) {
19 21 $collection = Variables_Collection::hydrate( $db_record );
20 22
@@ -30,9 +32,9 @@
30 32 $collection->increment_watermark();
31 33
32 34 $record = Prop_Type_Adapter::to_storage( $collection );
33 35
34 - if ( $this->kit->update_json_meta( Constants::VARIABLES_META_KEY, $record ) ) {
36 + if ( $this->kit->update_json_meta( static::VARIABLES_META_KEY, $record ) ) {
35 37 return $collection->watermark();
36 38 }
37 39
38 40 return false;