From a6a47a32572c3b71d0c6cf1a2918c0f9d6f8213b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 9 Nov 2002 16:24:46 +0000 Subject: - Applied Moshe's "theme head" patch: "This patch to theme.inc adds the ability for modules to insert HTML into the section of all web pages. The additional modules in this directory [ed: blog.module] demonstate possible uses for the new _head() hook." --- includes/theme.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'includes') 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 = "\n"; - $output .= "". variable_get(site_name, "drupal") ."background\" text=\"$this->foreground\">"; + $output .= "". variable_get(site_name, "drupal") .""; + $output .= theme_head($main); + $output .= "background\" text=\"$this->foreground\">"; $output .= "
"; 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; -- cgit v1.2.3