← All changes
|
modules/atomic-widgets/elements/atomic-form/atomic-form-promotion.php
+8
-5
4.1.2
→
4.3.1
View file →
| @@ -3,9 +3,10 @@ | ||
| 3 | 3 | namespace Elementor\Modules\AtomicWidgets\Elements\Atomic_Form; |
| 4 | 4 | |
| 5 | 5 | use Elementor\Modules\AtomicWidgets\Elements\Base\Atomic_Element_Base; |
| 6 | 6 | use Elementor\Modules\AtomicWidgets\Elements\Base\Has_Element_Template; |
| 7 | -use Elementor\Modules\AtomicWidgets\PropTypes\Classes_Prop_Type; | |
| 7 | +use Elementor\Modules\AtomicWidgets\Elements\Base\Html_Tag_Computer; | |
| 8 | +use Elementor\Modules\AtomicWidgets\Elements\Promotions\Preserves_Children_Subtree; | |
| 8 | 9 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; |
| 9 | 10 | use Elementor\Modules\AtomicWidgets\Styles\Style_Definition; |
| 10 | 11 | use Elementor\Modules\AtomicWidgets\Styles\Style_Variant; |
| 11 | 12 | |
| @@ -14,8 +15,9 @@ | ||
| 14 | 15 | } |
| 15 | 16 | |
| 16 | 17 | class Atomic_Form_Promotion extends Atomic_Element_Base { |
| 17 | 18 | use Has_Element_Template; |
| 19 | + use Preserves_Children_Subtree; | |
| 18 | 20 | |
| 19 | 21 | const BASE_STYLE_KEY = 'base'; |
| 20 | 22 | public function __construct( $data = [], $args = null ) { |
| 21 | 23 | parent::__construct( $data, $args ); |
| @@ -38,13 +40,14 @@ | ||
| 38 | 40 | public function get_icon() { |
| 39 | 41 | return 'eicon-atomic-form'; |
| 40 | 42 | } |
| 41 | 43 | |
| 44 | + public static function get_computed_html_tag( array $settings ): string { | |
| 45 | + return Html_Tag_Computer::compute( $settings, 'div' ); | |
| 46 | + } | |
| 47 | + | |
| 42 | 48 | protected static function define_props_schema(): array { |
| 43 | - return [ | |
| 44 | - 'classes' => Classes_Prop_Type::make() | |
| 45 | - ->default( [] ), | |
| 46 | - ]; | |
| 49 | + return Atomic_Form::get_base_props_schema(); | |
| 47 | 50 | } |
| 48 | 51 | |
| 49 | 52 | protected function define_atomic_controls(): array { |
| 50 | 53 | return []; |