← All changes
|
modules/atomic-widgets/elements/atomic-tabs/atomic-tab/atomic-tab.php
+9
-7
4.3.0
→
4.1.4
View file →
| @@ -2,9 +2,8 @@ | ||
| 2 | 2 | namespace Elementor\Modules\AtomicWidgets\Elements\Atomic_Tabs\Atomic_Tab; |
| 3 | 3 | |
| 4 | 4 | use Elementor\Modules\AtomicWidgets\Elements\Base\Atomic_Element_Base; |
| 5 | 5 | use Elementor\Modules\AtomicWidgets\Elements\Base\Has_Element_Template; |
| 6 | -use Elementor\Modules\AtomicWidgets\Elements\Base\Html_Tag_Computer; | |
| 7 | 6 | use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; |
| 8 | 7 | use Elementor\Modules\AtomicWidgets\PropTypes\Size_Prop_Type; |
| 9 | 8 | use Elementor\Modules\AtomicWidgets\Styles\Style_Definition; |
| 10 | 9 | use Elementor\Modules\AtomicWidgets\Styles\Style_Variant; |
| @@ -10,9 +9,9 @@ | ||
| 10 | 9 | use Elementor\Modules\AtomicWidgets\Styles\Style_Variant; |
| 11 | 10 | use Elementor\Modules\AtomicWidgets\Styles\Style_States; |
| 12 | 11 | use Elementor\Modules\AtomicWidgets\Controls\Section; |
| 13 | 12 | use Elementor\Modules\AtomicWidgets\PropTypes\Classes_Prop_Type; |
| 14 | -use Elementor\Modules\AtomicWidgets\PropTypes\Escaped_Html_Prop_Type; | |
| 13 | +use Elementor\Modules\AtomicWidgets\PropTypes\Html_V3_Prop_Type; | |
| 15 | 14 | use Elementor\Modules\AtomicWidgets\Elements\Atomic_Paragraph\Atomic_Paragraph; |
| 16 | 15 | use Elementor\Modules\AtomicWidgets\PropTypes\Attributes_Prop_Type; |
| 17 | 16 | use Elementor\Modules\AtomicWidgets\PropTypes\Color_Prop_Type; |
| 18 | 17 | use Elementor\Modules\AtomicWidgets\Elements\Base\Render_Context; |
| @@ -59,12 +58,8 @@ | ||
| 59 | 58 | public function should_show_in_panel() { |
| 60 | 59 | return false; |
| 61 | 60 | } |
| 62 | 61 | |
| 63 | - public static function get_computed_html_tag( array $settings ): string { | |
| 64 | - return Html_Tag_Computer::compute( $settings, 'button' ); | |
| 65 | - } | |
| 66 | - | |
| 67 | 62 | protected static function define_props_schema(): array { |
| 68 | 63 | return [ |
| 69 | 64 | 'classes' => Classes_Prop_Type::make() |
| 70 | 65 | ->default( [] ), |
| @@ -155,13 +150,20 @@ | ||
| 155 | 150 | 'tabindex' => '-1', |
| 156 | 151 | ]; |
| 157 | 152 | } |
| 158 | 153 | |
| 154 | + protected function define_default_html_tag() { | |
| 155 | + return 'button'; | |
| 156 | + } | |
| 157 | + | |
| 159 | 158 | protected function define_default_children() { |
| 160 | 159 | return [ |
| 161 | 160 | Atomic_Paragraph::generate() |
| 162 | 161 | ->settings( [ |
| 163 | - 'paragraph' => Escaped_Html_Prop_Type::generate( 'Tab' ), | |
| 162 | + 'paragraph' => Html_V3_Prop_Type::generate( [ | |
| 163 | + 'content' => String_Prop_Type::generate( 'Tab' ), | |
| 164 | + 'children' => [], | |
| 165 | + ] ), | |
| 164 | 166 | 'tag' => String_Prop_Type::generate( 'span' ), |
| 165 | 167 | ] ) |
| 166 | 168 | ->build(), |
| 167 | 169 | ]; |