diff options
author | Evan Prodromou <evan@status.net> | 2009-09-23 23:23:13 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-09-23 23:23:13 -0400 |
commit | a5ed805aeabab3930d066b2777dbab9663bc487f (patch) | |
tree | 873304b61be066cc33df4cf1b0bc97dc222826e5 /lib | |
parent | 543e3e797277526ac0f0c6ac99be64897955258a (diff) |
move scripts to just before </body>, add event for scripts that need to be in <head>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/action.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/action.php b/lib/action.php index 670eb498c..ebc812aca 100644 --- a/lib/action.php +++ b/lib/action.php @@ -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'); } |