]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move scripts to just before </body>, add event for scripts that need to be in <head>
authorEvan Prodromou <evan@status.net>
Thu, 24 Sep 2009 03:23:13 +0000 (23:23 -0400)
committerEvan Prodromou <evan@status.net>
Sun, 4 Oct 2009 07:14:39 +0000 (03:14 -0400)
lib/action.php

index 71ceffe20dbf9a5d2b033814567e99a188547c64..1b2f7375211364561a9f05409d55758294b5c325 100644 (file)
@@ -120,14 +120,16 @@ 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('StartShowHeadElements', array($this))) {
+            $this->showTitle();
+            $this->showShortcutIcon();
+            $this->showStylesheets();
+            $this->showOpenSearch();
+            $this->showFeeds();
+            $this->showDescription();
+            $this->extraHead();
+            Event::handle('EndShowHeadElements', array($this));
+        }
         $this->elementEnd('head');
     }
 
@@ -352,6 +354,7 @@ class Action extends HTMLOutputter // lawsuit
             Event::handle('EndShowFooter', array($this));
         }
         $this->elementEnd('div');
+        $this->showScripts();
         $this->elementEnd('body');
     }