PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.0-beta3
Elementor Website Builder – more than just a page builder v4.3.0-beta3
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/atomic-widgets/elements/base/widget-builder.php +10 -0 4.0.84.3.0-beta3 View file →
@@ -6,8 +6,9 @@
6 6 protected $widget_type;
7 7 protected $settings = [];
8 8 protected $is_locked = false;
9 9 protected $editor_settings = [];
10 + protected $meta = [];
10 11
11 12 public static function make( string $widget_type ) {
12 13 return new self( $widget_type );
13 14 }
@@ -30,8 +31,13 @@
30 31 $this->editor_settings = $editor_settings;
31 32 return $this;
32 33 }
33 34
35 + public function meta( array $meta ) {
36 + $this->meta = $meta;
37 + return $this;
38 + }
39 +
34 40 public function build() {
35 41 $widget_data = [
36 42 'elType' => 'widget',
37 43 'widgetType' => $this->widget_type,
@@ -38,8 +44,12 @@
38 44 'settings' => $this->settings,
39 45 'isLocked' => $this->is_locked,
40 46 'editor_settings' => $this->editor_settings,
41 47 ];
48 +
49 + if ( ! empty( $this->meta ) ) {
50 + $widget_data['meta'] = $this->meta;
51 + }
42 52
43 53 return $widget_data;
44 54 }
45 55 }