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