PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.5.2
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.5.2
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
← All changes | includes/Core/Platform/Elementor.php +28 -0 3.1.103.5.2 View file →
@@ -329,5 +329,33 @@
329 329 $importer = new ElementorImporter();
330 330
331 331 return $importer->get_data( $data );
332 332 }
333 +
334 + /**
335 + * Filter Child Type
336 + *
337 + * @param $child_type
338 + * @param $element_data
339 + * @param $element
340 + *
341 + * @return mixed
342 + */
343 + public static function filter_child_type( $child_type, $element_data, $element ) {
344 + // Fix for Elementor Pro Promotion Widget
345 + if ( is_a( $element, 'Elementor\Modules\Promotions\Widgets\Pro_Widget_Promotion' ) || ( is_object( $element ) && 'pro-promotion' === $element->get_name() ) ) {
346 + $el_types = array_keys( Plugin::$instance->elements_manager->get_element_types() );
347 +
348 + if ( isset( $element_data['elType'] ) && in_array( $element_data['elType'], $el_types, true ) ) {
349 + return Plugin::$instance->elements_manager->get_element_types( $element_data['elType'] );
350 + }
351 +
352 + if ( ! isset( $element_data['widgetType'] ) ) {
353 + return null;
354 + }
355 +
356 + return Plugin::$instance->widgets_manager->get_widget_types( $element_data['widgetType'] );
357 + }
358 +
359 + return $child_type;
360 + }
333 361 }