← All changes
|
modules/atomic-widgets/elements/atomic-button/atomic-button.html.twig
+15
-9
4.3.0-beta3
→
3.28.0-dev2
View file →
| @@ -1,9 +1,15 @@ | ||
| 1 | -{% import 'elementor/macros' as m %} | |
| 2 | -{%- set allowed_tags = '<b><strong><sup><sub><s><em><i><u><del><span><br>' -%} | |
| 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') }}> | |
| 1 | +{% set classes = settings.classes | merge( [ base_styles.base ] ) | join(' ') %} | |
| 2 | + | |
| 3 | +{% if settings.link.href %} | |
| 4 | + <a | |
| 5 | + href="{{ settings.link.href | e('full_url') }}" | |
| 6 | + target="{{ settings.link.target }}" | |
| 7 | + class="{{ classes }}" | |
| 8 | + > | |
| 9 | + {{ settings.text }} | |
| 10 | + </a> | |
| 11 | +{% else %} | |
| 12 | + <button class="{{ classes }}"> | |
| 13 | + {{ settings.text }} | |
| 14 | + </button> | |
| 15 | +{% endif %} | |