diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-11-09 16:24:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-11-09 16:24:46 +0000 |
commit | a6a47a32572c3b71d0c6cf1a2918c0f9d6f8213b (patch) | |
tree | f3951ae48b9bc2e56dad3f093373c8ccd97f8616 /includes/theme.inc | |
parent | 562df8fe43f8794317c974dae463f5470cfdc497 (diff) | |
download | brdo-a6a47a32572c3b71d0c6cf1a2918c0f9d6f8213b.tar.gz brdo-a6a47a32572c3b71d0c6cf1a2918c0f9d6f8213b.tar.bz2 |
- Applied Moshe's "theme head" patch:
"This patch to theme.inc adds the ability for modules to insert HTML
into the <HEAD> section of all web pages. The additional modules in
this directory [ed: blog.module] demonstate possible uses for the
new _head() hook."
Diffstat (limited to 'includes/theme.inc')
-rw-r--r-- | includes/theme.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index e153258af..a8659ab5e 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -20,7 +20,9 @@ class BaseTheme { function header($title = "") { $output = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n"; - $output .= "<html><head><title>". variable_get(site_name, "drupal") ."</title></head><body bgcolor=\"$this->background\" text=\"$this->foreground\">"; + $output .= "<html><head><title>". variable_get(site_name, "drupal") ."</title>"; + $output .= theme_head($main); + $output .= "</head><body bgcolor=\"$this->background\" text=\"$this->foreground\">"; $output .= "<table border=\"0\" cellspacing=\"4\" cellpadding=\"4\"><tr><td valign=\"top\" width=\"170\">"; print $output; @@ -122,6 +124,11 @@ function theme_list() { return $list; } +function theme_head($main = 0) { + $head = module_invoke_all("head", $main); + return "\n". implode($head, "\n"). "\n"; +} + function theme_init() { global $user; |