summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-04 13:01:06 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-04 13:01:06 -0400
commit9421b36498f856ca7f29c3b803b99521590d58c5 (patch)
tree22486deed915bd6068251455922c61396a133465
parent8dcb6c86ae47ed478821f0470cc1f9c58bf5a709 (diff)
add an event for head children
-rw-r--r--EVENTS.txt6
-rw-r--r--lib/action.php19
2 files changed, 17 insertions, 8 deletions
diff --git a/EVENTS.txt b/EVENTS.txt
index 002801ff6..ef4c2cffa 100644
--- a/EVENTS.txt
+++ b/EVENTS.txt
@@ -158,6 +158,12 @@ StartShowBody: called before showing the <body> element and children
EndShowBody: called after showing the <body> element (and </body>)
- $action: action object being shown
+StartHeadChildren: called before showing the children of <head> element (after <head> tag)
+- $action: action object being shown
+
+EndHeadChildren: called after showing the children of <head> element (before </head>)
+- $action: action object being shown
+
StartPersonalGroupNav: beginning of personal group nav menu
- $action: action object being shown
diff --git a/lib/action.php b/lib/action.php
index a5244371a..158870fa8 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -120,14 +120,17 @@ class Action extends HTMLOutputter // lawsuit
{
// XXX: attributes (profile?)
$this->elementStart('head');
- $this->showTitle();
- $this->showShortcutIcon();
- $this->showStylesheets();
- $this->showScripts();
- $this->showOpenSearch();
- $this->showFeeds();
- $this->showDescription();
- $this->extraHead();
+ if (Event::handle('StartHeadChildren', array($this))) {
+ $this->showTitle();
+ $this->showShortcutIcon();
+ $this->showStylesheets();
+ $this->showScripts();
+ $this->showOpenSearch();
+ $this->showFeeds();
+ $this->showDescription();
+ $this->extraHead();
+ Event::handle('EndHeadChildren', array($this));
+ }
$this->elementEnd('head');
}