]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add an event for head children
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:01:06 +0000 (13:01 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:01:06 +0000 (13:01 -0400)
EVENTS.txt
lib/action.php

index 002801ff631d3615cdc5fad43abd8824ef1866c4..ef4c2cffa4f5d15f458715615d67f8fb3f3c6b52 100644 (file)
@@ -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
 
index a5244371a5def60d0bf6635336044dba41a36185..158870fa8e8d02da57a2e4177161e469fb5adadb 100644 (file)
@@ -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');
     }