diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 0de03afe3..53e7b38b6 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -216,7 +216,10 @@ function theme_get_settings($key = NULL) { 'mission' => '', 'default_logo' => 1, 'logo_path' => '', + 'default_favicon' => 1, + 'favicon_path' => '', 'toggle_logo' => 1, + 'toggle_favicon' => 1, 'toggle_name' => 1, 'toggle_search' => 1, 'toggle_slogan' => 0, @@ -289,6 +292,20 @@ function theme_get_setting($setting_name, $refresh = FALSE) { } } + if ($settings['toggle_favicon']) { + if ($settings['default_favicon']) { + if (file_exists($favicon = dirname($theme_object->filename) .'/favicon.ico')) { + $settings['favicon'] = $favicon; + } + else { + $settings['favicon'] = 'misc/favicon.ico'; + } + } + elseif ($settings['favicon_path']) { + $settings['favicon'] = $settings['favicon_path']; + } + } + foreach (array('primary', 'secondary') as $type) { // Get the data to populate the textfields, if the variable is not an array .. try to parse the old-style link format. $value = $settings[$type . '_links']; |