← All changes
|
modules/atomic-widgets/elements/atomic-button/atomic-button.html.twig
+7
-13
4.2.0
→
4.3.0-beta3
View file →
| @@ -1,15 +1,9 @@ | ||
| 1 | 1 | {% import 'elementor/macros' as m %} |
| 2 | 2 | {%- set allowed_tags = '<b><strong><sup><sub><s><em><i><u><del><span><br>' -%} |
| 3 | -{%- set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') -%} | |
| 4 | -{%- if settings.link is defined and settings.link.href is defined and settings.link.href is not empty -%} | |
| 5 | - <{{ settings.link.tag | default('a') | e('html_tag') }} | |
| 6 | - {{- m.render_link_attributes(settings.link) }} class="{{ classes }}" data-interaction-id="{{ interaction_id }}" | |
| 7 | - {{- m.render_custom_attributes(settings) }}> | |
| 8 | - {{ settings.text | striptags(allowed_tags) | raw }} | |
| 9 | - </{{ settings.link.tag | default('a') | e('html_tag') }}> | |
| 10 | -{%- else -%} | |
| 11 | - <button class="{{ classes }}" data-interaction-id="{{ interaction_id }}" | |
| 12 | - {{- m.render_custom_attributes(settings) }}> | |
| 13 | - {{ settings.text | striptags(allowed_tags) | raw }} | |
| 14 | - </button> | |
| 15 | -{%- endif %} | |
| 3 | +{%- set has_link = settings.link is defined and settings.link.href is defined and settings.link.href is not empty -%} | |
| 4 | +{%- set classes = settings.classes | merge( [ base_styles.base, m.default_tag_class(tag) ] ) | join(' ') -%} | |
| 5 | +<{{ tag | e('html_tag') }} | |
| 6 | + {%- if has_link %}{{ m.render_link_attributes(settings.link) }}{% endif %} class="{{ classes }}" data-interaction-id="{{ interaction_id }}" | |
| 7 | + {{- m.render_custom_attributes(settings) }}> | |
| 8 | + {{ settings.text | striptags(allowed_tags) | raw }} | |
| 9 | +</{{ tag | e('html_tag') }}> | |