Use emojii flags

This commit is contained in:
David Stone committed 2025-02-15 14:57:51 -07:00
1 parent 3113413c3d
commit 6d7e7cef66
6 files changed
+24 -3660

No files matched your search

+7 -1821
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
-1
View File
@@ -1 +0,0 @@
@charset "UTF-8";.wu-flag-icon,.wu-flag-icon-background{background-size:contain;background-position:50%;background-repeat:no-repeat}.wu-flag-icon{position:relative;display:inline-block;width:1.3333333333em;line-height:1}.wu-flag-icon::before{content:" "}.wu-flag-icon.wu-flag-icon-squared{width:1em}.wu-flag-icon-ad{background-image:url(../img/flags/4x3/ad.svg)}.wu-flag-icon-ad.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ad.svg)}.wu-flag-icon-ae{background-image:url(../img/flags/4x3/ae.svg)}.wu-flag-icon-ae.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ae.svg)}.wu-flag-icon-af{background-image:url(../img/flags/4x3/af.svg)}.wu-flag-icon-af.wu-flag-icon-squared{background-image:url(../img/flags/1x1/af.svg)}.wu-flag-icon-ag{background-image:url(../img/flags/4x3/ag.svg)}.wu-flag-icon-ag.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ag.svg)}.wu-flag-icon-ai{background-image:url(../img/flags/4x3/ai.svg)}.wu-flag-icon-ai.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ai.svg)}.wu-flag-icon-al{background-image:url(../img/flags/4x3/al.svg)}.wu-flag-icon-al.wu-flag-icon-squared{background-image:url(../img/flags/1x1/al.svg)}.wu-flag-icon-am{background-image:url(../img/flags/4x3/am.svg)}.wu-flag-icon-am.wu-flag-icon-squared{background-image:url(../img/flags/1x1/am.svg)}.wu-flag-icon-ao{background-image:url(../img/flags/4x3/ao.svg)}.wu-flag-icon-ao.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ao.svg)}.wu-flag-icon-aq{background-image:url(../img/flags/4x3/aq.svg)}.wu-flag-icon-aq.wu-flag-icon-squared{background-image:url(../img/flags/1x1/aq.svg)}.wu-flag-icon-ar{background-image:url(../img/flags/4x3/ar.svg)}.wu-flag-icon-ar.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ar.svg)}.wu-flag-icon-as{background-image:url(../img/flags/4x3/as.svg)}.wu-flag-icon-as.wu-flag-icon-squared{background-image:url(../img/flags/1x1/as.svg)}.wu-flag-icon-at{background-image:url(../img/flags/4x3/at.svg)}.wu-flag-icon-at.wu-flag-icon-squared{background-image:url(../img/flags/1x1/at.svg)}.wu-flag-icon-au{background-image:url(../img/flags/4x3/au.svg)}.wu-flag-icon-au.wu-flag-icon-squared{background-image:url(../img/flags/1x1/au.svg)}.wu-flag-icon-aw{background-image:url(../img/flags/4x3/aw.svg)}.wu-flag-icon-aw.wu-flag-icon-squared{background-image:url(../img/flags/1x1/aw.svg)}.wu-flag-icon-ax{background-image:url(../img/flags/4x3/ax.svg)}.wu-flag-icon-ax.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ax.svg)}.wu-flag-icon-az{background-image:url(../img/flags/4x3/az.svg)}.wu-flag-icon-az.wu-flag-icon-squared{background-image:url(../img/flags/1x1/az.svg)}.wu-flag-icon-ba{background-image:url(../img/flags/4x3/ba.svg)}.wu-flag-icon-ba.wu-flag-icon-squared{background-image:url(../img/flags/1x1/ba.svg)}.wu-flag-icon-bb{background-image:url(../img/flags/4x3/bb.svg)}.wu-flag-icon-bb.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bb.svg)}.wu-flag-icon-bd{background-image:url(../img/flags/4x3/bd.svg)}.wu-flag-icon-bd.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bd.svg)}.wu-flag-icon-be{background-image:url(../img/flags/4x3/be.svg)}.wu-flag-icon-be.wu-flag-icon-squared{background-image:url(../img/flags/1x1/be.svg)}.wu-flag-icon-bf{background-image:url(../img/flags/4x3/bf.svg)}.wu-flag-icon-bf.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bf.svg)}.wu-flag-icon-bg{background-image:url(../img/flags/4x3/bg.svg)}.wu-flag-icon-bg.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bg.svg)}.wu-flag-icon-bh{background-image:url(../img/flags/4x3/bh.svg)}.wu-flag-icon-bh.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bh.svg)}.wu-flag-icon-bi{background-image:url(../img/flags/4x3/bi.svg)}.wu-flag-icon-bi.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bi.svg)}.wu-flag-icon-bj{background-image:url(../img/flags/4x3/bj.svg)}.wu-flag-icon-bj.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bj.svg)}.wu-flag-icon-bl{background-image:url(../img/flags/4x3/bl.svg)}.wu-flag-icon-bl.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bl.svg)}.wu-flag-icon-bm{background-image:url(../img/flags/4x3/bm.svg)}.wu-flag-icon-bm.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bm.svg)}.wu-flag-icon-bn{background-image:url(../img/flags/4x3/bn.svg)}.wu-flag-icon-bn.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bn.svg)}.wu-flag-icon-bo{background-image:url(../img/flags/4x3/bo.svg)}.wu-flag-icon-bo.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bo.svg)}.wu-flag-icon-bq{background-image:url(../img/flags/4x3/bq.svg)}.wu-flag-icon-bq.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bq.svg)}.wu-flag-icon-br{background-image:url(../img/flags/4x3/br.svg)}.wu-flag-icon-br.wu-flag-icon-squared{background-image:url(../img/flags/1x1/br.svg)}.wu-flag-icon-bs{background-image:url(../img/flags/4x3/bs.svg)}.wu-flag-icon-bs.wu-flag-icon-squared{background-image:url(../img/flags/1x1/bs.Line truncated
+2
View File
@@ -0,0 +1,2 @@
import { polyfillCountryFlagEmojis } from "https://cdn.skypack.dev/country-flag-emoji-polyfill";
polyfillCountryFlagEmojis();
@@ -525,6 +525,8 @@ class Dashboard_Admin_Page extends Base_Admin_Page {
wp_enqueue_style('wu-apex-charts', wu_get_asset('apexcharts.css', 'css'), [], wu_get_version());
wp_enqueue_style('wu-flags');
wp_enqueue_script_module('wu-flags-polyfill');
}
/**
+13 -13
View File
@@ -25,7 +25,7 @@ foreach ($countries as $country_code => $count) {
];
$data[] = $line;
} // end foreach;
}
$page->render_csv_button(
[
@@ -49,8 +49,8 @@ $page->render_csv_button(
<thead>
<tr>
<th><?php _e('Country', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Customer Count', 'wp-ultimo'); ?></th>
<th><?php esc_html_e('Country', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php esc_html_e('Customer Count', 'wp-ultimo'); ?></th>
</tr>
</thead>
@@ -63,15 +63,15 @@ $page->render_csv_button(
<?php
printf(
'<span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-mr-1" %s></span>',
strtolower($country_code),
wu_tooltip_text(wu_get_country_name($country_code))
'<span class="wu-flag-icon wu-w-5 wu-mr-1" %s>%s</span>',
wu_tooltip_text(wu_get_country_name($country_code)), // phpcs:ignore WordPress.Security.EscapeOutput
esc_html(wu_get_flag_emoji($country_code)),
);
?>
<?php echo wu_get_country_name($country_code); ?>
<?php echo esc_html(wu_get_country_name($country_code)); ?>
</td>
<td class="wu-text-right"><?php echo $count; ?></td>
<td class="wu-text-right"><?php echo esc_html($count); ?></td>
</tr>
<?php
@@ -87,8 +87,8 @@ $page->render_csv_button(
?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo $state; ?></td>
<td class="wu-text-right"><?php echo $state_count; ?></td>
<td class="wu-text-xs">|&longrightarrow; <?php echo esc_html($state); ?></td>
<td class="wu-text-right"><?php echo esc_html($state_count); ?></td>
</tr>
<?php endforeach; ?>
@@ -96,8 +96,8 @@ $page->render_csv_button(
<?php if ($state_list && $count - $_state_count >= 0) : ?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php _e('Other', 'wp-ultimo'); ?></td>
<td class="wu-text-right"><?php echo $count - $_state_count; ?></td>
<td class="wu-text-xs">|&longrightarrow; <?php esc_html_e('Other', 'wp-ultimo'); ?></td>
<td class="wu-text-right"><?php echo esc_html($count - $_state_count); ?></td>
</tr>
<?php endif; ?>
@@ -114,7 +114,7 @@ $page->render_csv_button(
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No countries registered yet.', 'wp-ultimo'); ?>
<?php esc_html_e('No countries registered yet.', 'wp-ultimo'); ?>
</div>