Skip to content

Commit 228edf6

Browse files
1.0.5
1 parent 92a458a commit 228edf6

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mage2pro/flag"
3-
,"version": "1.0.4"
3+
,"version": "1.0.5"
44
,"description": "A Magento 2 interface to the lipis/flag-icon-css library."
55
,"type": "magento2-module"
66
,"homepage": "https://mage2.pro"

lib/main.php

+14-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ function df_flag_link() {return df_link_inline(df_asset_name(null, 'Df_Flag', 'c
1515
* @param string $content [optional]
1616
* @return string
1717
*/
18-
function df_flag_span($iso2, $content = null) {return df_tag(
19-
'span', 'flag-icon flag-icon-' . strtolower('uk' === $iso2 ? 'gb' : $iso2), $content
18+
function df_flag_span($iso2, $content = null) {return df_flag_tag($iso2, $content);}
19+
20+
/**
21+
* 2018-09-17
22+
* Magento 2 core and third-party design themes can add a lot of styles to `span.flag-icon`.
23+
* In this case I use `div`instead of `span`.
24+
* @used-by df_flag_span()
25+
* @param string $iso2
26+
* @param string $content [optional]
27+
* @param string $tag [optional]
28+
* @return string
29+
*/
30+
function df_flag_tag($iso2, $content = null, $tag = 'span') {return df_tag(
31+
$tag, 'flag-icon flag-icon-' . strtolower('uk' === $iso2 ? 'gb' : $iso2), $content
2032
);}

0 commit comments

Comments
 (0)