PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.4
Elementor Website Builder – more than just a page builder v4.2.4
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/components/widgets/component-instance.php +7 -3 4.3.0-beta24.2.4 View file →
@@ -17,9 +17,9 @@
17 17 class Component_Instance extends Atomic_Widget_Base {
18 18 use Has_Template;
19 19
20 20 public static function get_element_type(): string {
21 - return Component_Instance_Prop_Type::WIDGET_TYPE;
21 + return 'e-component';
22 22 }
23 23
24 24 public function show_in_panel() {
25 25 return false;
@@ -122,9 +122,13 @@
122 122 return Format_Component_Elements_Id::format( $elements_data, [ $this->get_id() ] );
123 123 }
124 124
125 125 private function get_component_id(): ?int {
126 - $component_id = Component_Instance_Prop_Type::extract_component_id( $this->get_settings() );
126 + $settings = $this->get_settings();
127 127
128 - return null === $component_id ? null : (int) $component_id;
128 + if ( ! isset( $settings['component_instance']['value']['component_id']['value'] ) ) {
129 + return null;
130 + }
131 +
132 + return (int) $settings['component_instance']['value']['component_id']['value'];
129 133 }
130 134 }