parent
821a2bde33
commit
d81c3bc07c
|
|
@ -46,20 +46,14 @@ if (!function_exists('mta_host')) {
|
|||
if ($sub) {
|
||||
return domain_host($sub);
|
||||
}
|
||||
|
||||
// 3️⃣ Notfall: statischer Fallback
|
||||
return domain_host('mx');
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('countryFlag')) {
|
||||
/**
|
||||
* Gibt das Flag-Emoji eines Landes zurück anhand des ISO-Codes (z. B. "de" → 🇩🇪).
|
||||
*/
|
||||
function countryFlag(string $code): string
|
||||
{
|
||||
$code = strtoupper($code);
|
||||
// Unicode-Magic: A -> 🇦, B -> 🇧 etc.
|
||||
return implode('', array_map(
|
||||
fn($char) => mb_chr(ord($char) + 127397, 'UTF-8'),
|
||||
str_split($code)
|
||||
|
|
|
|||
Loading…
Reference in New Issue