From bb5916e9bc95f258f626833df9d9904c666ba32c Mon Sep 17 00:00:00 2001 From: danpros Date: Thu, 14 Mar 2024 06:38:15 +0700 Subject: [PATCH] Favicon image setting --- config/config.ini.example | 3 +++ system/admin/views/config-metatags.html.php | 8 +++++++- system/includes/functions.php | 8 +++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/config/config.ini.example b/config/config.ini.example index e511567..d55b50a 100644 --- a/config/config.ini.example +++ b/config/config.ini.example @@ -180,6 +180,9 @@ default.title.format = "%page_title% - %blog_title%" ; Default image for Open Graph default.image = "" +; Favicon image +favicon.image = "" + ; Set the theme here views.root = "themes/twentysixteen" diff --git a/system/admin/views/config-metatags.html.php b/system/admin/views/config-metatags.html.php index 48800a8..6b399e5 100644 --- a/system/admin/views/config-metatags.html.php +++ b/system/admin/views/config-metatags.html.php @@ -67,10 +67,16 @@ if (empty($defaultFormat)) {

+
+ +
+ +
+
- +

diff --git a/system/includes/functions.php b/system/includes/functions.php index 72eff5d..c95c47b 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -3421,12 +3421,18 @@ function head_contents() $output = ''; $wmt_id = config('google.wmt.id'); $version = 'HTMLy ' . constant('HTMLY_VERSION'); + $favicon = config('favicon.image'); + if (empty($favicon)) { + $favicon = '' . "\n"; + } else { + $favicon = '' . "\n"; + } $output .= '' . "\n"; $output .= '' . "\n"; $output .= '' . "\n"; $output .= '' . "\n"; - $output .= '' . "\n"; + $output .= $favicon; $output .= '' . "\n"; $output .= '' . "\n"; if (!empty($wmt_id)) {