summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/chameleon/chameleon.theme5
-rw-r--r--themes/engines/phptemplate/phptemplate.engine10
2 files changed, 11 insertions, 4 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme
index 563103c74..a0f60a6ed 100644
--- a/themes/chameleon/chameleon.theme
+++ b/themes/chameleon/chameleon.theme
@@ -9,6 +9,7 @@
function chameleon_features() {
return array(
'logo',
+ 'toggle_favicon',
'toggle_name',
'toggle_slogan',
'toggle_primary_links',
@@ -18,6 +19,10 @@ function chameleon_features() {
function chameleon_page($content) {
$language = $GLOBALS['locale'];
+ if (theme_get_setting('toggle_favicon')) {
+ drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />');
+ }
+
$title = drupal_get_title();
$output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
diff --git a/themes/engines/phptemplate/phptemplate.engine b/themes/engines/phptemplate/phptemplate.engine
index 11561716f..310d4e68d 100644
--- a/themes/engines/phptemplate/phptemplate.engine
+++ b/themes/engines/phptemplate/phptemplate.engine
@@ -93,6 +93,7 @@ function _phptemplate_default_variables($hook, $variables) {
function phptemplate_features() {
return array(
'logo',
+ 'toggle_favicon',
'toggle_name',
'toggle_search',
'toggle_slogan',
@@ -110,15 +111,16 @@ function phptemplate_features() {
function phptemplate_page($content) {
/* Set title and breadcrumb to declared values */
- if (file_exists(path_to_theme() . '/favicon.ico')) {
- drupal_set_html_head("<link rel=\"shortcut icon\" href=\"" . path_to_theme() . "/favicon.ico\" />\n");
- }
-
if ($_GET['q'] == variable_get('site_frontpage', 'node')) {
$mission = theme_get_setting('mission');
$frontpage = true;
}
+ /* Add favicon */
+ if (theme_get_setting('toggle_favicon')) {
+ drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />');
+ }
+
/**
* Populate sidebars.
*/