[ticket/15538] Amend iconfiy to data attributes

PHPBB3-15538
This commit is contained in:
mrgoldy 2019-11-07 10:55:51 +01:00
parent 0eb9912af8
commit fd95dfe5b3
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{% spaceless %} {% spaceless %}
<i class="iconify o-icon {{ ICON ~ (CLASSES ? ' ' ~ CLASSES) }}"{% if S_HIDDEN %}{% if TITLE %} title="{{ lang(TITLE) }}"{% endif %} aria-hidden="true"{% endif %}{{ ATTRIBUTES }}></i> <i class="iconify o-icon{{ CLASSES ? ' ' ~ CLASSES }}"{% if S_HIDDEN %}{% if TITLE %} title="{{ lang(TITLE) }}"{% endif %} aria-hidden="true"{% endif %} data-icon="fa:{{ ICON }}" data-inline="true"{{ ATTRIBUTES }}></i>
{% if TITLE %}<span{% if S_HIDDEN %} class="sr-only"{% endif %}>{{ lang(TITLE) }}</span>{% endif %} {% if TITLE %}<span{% if S_HIDDEN %} class="sr-only"{% endif %}>{{ lang(TITLE) }}</span>{% endif %}
{% endspaceless %} {% endspaceless %}

View file

@ -313,7 +313,7 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
'attributes' => [], 'attributes' => [],
], ],
[], [],
'<i class="iconify o-icon phone"></i>', '<i class="iconify o-icon" data-icon="fa:phone" data-inline="true"></i>',
], ],
/** Iconify: all options */ /** Iconify: all options */
[ [
@ -330,7 +330,7 @@ class phpbb_template_extension_test extends phpbb_template_template_test_case
[ [
'ICON_PENCIL' => 'Pencil icon', 'ICON_PENCIL' => 'Pencil icon',
], ],
'<i class="iconify o-icon pencil icon-lg" title="Pencil icon" aria-hidden="true" data-swap="Swap text"></i> '<i class="iconify o-icon icon-lg" title="Pencil icon" aria-hidden="true" data-icon="fa:phone" data-inline="true" data-swap="Swap text"></i>
<span class="sr-only">Pencil icon</span>', <span class="sr-only">Pencil icon</span>',
], ],
/** PNG: default */ /** PNG: default */