diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index 1d97d393..990141bb 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -6,29 +6,20 @@ class Theme public static function socialNetworks() { global $site; - $socialNetworks = array( - 'github' => 'Github', - 'gitlab' => 'GitLab', - 'twitter' => 'Twitter', - 'facebook' => 'Facebook', - 'instagram' => 'Instagram', - 'codepen' => 'Codepen', - 'linkedin' => 'Linkedin', - 'xing' => 'Xing', - 'telegram' => 'Telegram', - 'mastodon' => 'Mastodon', - 'vk' => 'VK', - 'dribbble' => 'Dribbble' - ); + $socialNetworks = array(); - foreach ($socialNetworks as $key => $label) { - if (!$site->{$key}()) { - unset($socialNetworks[$key]); + foreach ($GLOBALS['SOCIAL_NETWORKS'] as $key => $label) { + if ($site->getSocialNetwork($label) != "") { + $socialNetworks[Text::cleanUrl($label)] = $label; } } return $socialNetworks; } + public static function socialNetworkEmoji($socialNetwork) { + return $GLOBALS['SOCIAL_NETWORKS_EMOJI'][Text::cleanUrl($socialNetwork)]; + } + public static function title() { global $site; diff --git a/bl-themes/alternative/php/navbar.php b/bl-themes/alternative/php/navbar.php index ed77ea82..6a17659f 100644 --- a/bl-themes/alternative/php/navbar.php +++ b/bl-themes/alternative/php/navbar.php @@ -20,9 +20,9 @@ $label): ?> diff --git a/bl-themes/blogx/php/navbar.php b/bl-themes/blogx/php/navbar.php index 09e68e34..c10dd66d 100644 --- a/bl-themes/blogx/php/navbar.php +++ b/bl-themes/blogx/php/navbar.php @@ -19,9 +19,9 @@ $label) : ?> diff --git a/bl-themes/popeye/php/footer.php b/bl-themes/popeye/php/footer.php index 798dd1b8..e24666b0 100644 --- a/bl-themes/popeye/php/footer.php +++ b/bl-themes/popeye/php/footer.php @@ -2,7 +2,7 @@