diff --git a/library/includes/functions.php b/library/includes/functions.php index 5ed6e33cc..1957bf992 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1184,14 +1184,21 @@ function render_flag(string $code, bool $showName = true): string global $lang; static $iconExtension = '.svg'; + $nameIgnoreList = [ + 'WBW', + 'PACE', + 'LGBT' + ]; + if (isset($lang['COUNTRIES'][$code])) { if ($code === '0') { return ''; // No selected } else { $flagIconPath = BB_ROOT . 'styles/images/flags/' . $code . $iconExtension; if (is_file($flagIconPath)) { - $countryName = $showName ? ' ' . str_short($lang['COUNTRIES'][$code], 20) : ''; - return '' . $code . '' . $countryName . ''; + $langName = $lang['COUNTRIES'][$code]; + $countryName = ($showName && !in_array($code, $nameIgnoreList)) ? ' ' . str_short($langName, 20) : ''; + return '' . $code . '' . $countryName . ''; } } }