← All changes
|
modules/components/widgets/component-instance.php
+6
-2
4.3.0-beta1
→
4.2.4
View file →
| @@ -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 | } |