diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-05-25 06:03:18 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-05-25 06:03:18 +0000 |
commit | 6be2c61896c9afe79ad8398c2a851df99e072e7e (patch) | |
tree | 93de416a3c691168ecf9f6d85a2963a3103f1691 /includes | |
parent | 753bc588d9e8a04ba626d272f1eb246fc802f794 (diff) | |
download | brdo-6be2c61896c9afe79ad8398c2a851df99e072e7e.tar.gz brdo-6be2c61896c9afe79ad8398c2a851df99e072e7e.tar.bz2 |
- #20809: User-configurable, per-theme, optional favicons.
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']; |