Use emojii flags
This commit is contained in:
1818
assets/css/flags.css
1818
assets/css/flags.css
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1
assets/css/flags/flag-icon.min.css
vendored
1
assets/css/flags/flag-icon.min.css
vendored
File diff suppressed because one or more lines are too long
2
assets/js/flags.js
Normal file
2
assets/js/flags.js
Normal 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-apex-charts', wu_get_asset('apexcharts.css', 'css'), [], wu_get_version());
|
||||||
|
|
||||||
wp_enqueue_style('wu-flags');
|
wp_enqueue_style('wu-flags');
|
||||||
|
|
||||||
|
wp_enqueue_script_module('wu-flags-polyfill');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,7 +25,7 @@ foreach ($countries as $country_code => $count) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$data[] = $line;
|
$data[] = $line;
|
||||||
} // end foreach;
|
}
|
||||||
|
|
||||||
$page->render_csv_button(
|
$page->render_csv_button(
|
||||||
[
|
[
|
||||||
@ -49,8 +49,8 @@ $page->render_csv_button(
|
|||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php _e('Country', 'wp-ultimo'); ?></th>
|
<th><?php esc_html_e('Country', 'wp-ultimo'); ?></th>
|
||||||
<th class="wu-text-right"><?php _e('Customer Count', 'wp-ultimo'); ?></th>
|
<th class="wu-text-right"><?php esc_html_e('Customer Count', 'wp-ultimo'); ?></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
@ -63,15 +63,15 @@ $page->render_csv_button(
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
printf(
|
printf(
|
||||||
'<span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-mr-1" %s></span>',
|
'<span class="wu-flag-icon wu-w-5 wu-mr-1" %s>%s</span>',
|
||||||
strtolower($country_code),
|
wu_tooltip_text(wu_get_country_name($country_code)), // phpcs:ignore WordPress.Security.EscapeOutput
|
||||||
wu_tooltip_text(wu_get_country_name($country_code))
|
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>
|
||||||
<td class="wu-text-right"><?php echo $count; ?></td>
|
<td class="wu-text-right"><?php echo esc_html($count); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
@ -87,8 +87,8 @@ $page->render_csv_button(
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="wu-text-xs">|⟶ <?php echo $state; ?></td>
|
<td class="wu-text-xs">|⟶ <?php echo esc_html($state); ?></td>
|
||||||
<td class="wu-text-right"><?php echo $state_count; ?></td>
|
<td class="wu-text-right"><?php echo esc_html($state_count); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -96,8 +96,8 @@ $page->render_csv_button(
|
|||||||
<?php if ($state_list && $count - $_state_count >= 0) : ?>
|
<?php if ($state_list && $count - $_state_count >= 0) : ?>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="wu-text-xs">|⟶ <?php _e('Other', 'wp-ultimo'); ?></td>
|
<td class="wu-text-xs">|⟶ <?php esc_html_e('Other', 'wp-ultimo'); ?></td>
|
||||||
<td class="wu-text-right"><?php echo $count - $_state_count; ?></td>
|
<td class="wu-text-right"><?php echo esc_html($count - $_state_count); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@ -114,7 +114,7 @@ $page->render_csv_button(
|
|||||||
|
|
||||||
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
|
<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>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user