summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-23 23:23:13 -0400
committerEvan Prodromou <evan@status.net>2009-10-04 03:14:39 -0400
commit9c460d591e1e11f7aa3970ffd0b3e320dd11d33e (patch)
tree8fd017d0a5b95df5ce90688176c0b3a0b8d1d914 /lib
parentc5047fd90ac8f6f057780a34065e320883c7a31f (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.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/action.php b/lib/action.php
index 71ceffe20..1b2f73752 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');
}