From: Evan Prodromou Date: Tue, 4 Aug 2009 17:01:06 +0000 (-0400) Subject: add an event for head children X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9421b36498f856ca7f29c3b803b99521590d58c5;p=quix0rs-gnu-social.git add an event for head children --- diff --git a/EVENTS.txt b/EVENTS.txt index 002801ff63..ef4c2cffa4 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -158,6 +158,12 @@ StartShowBody: called before showing the element and children EndShowBody: called after showing the element (and ) - $action: action object being shown +StartHeadChildren: called before showing the children of element (after tag) +- $action: action object being shown + +EndHeadChildren: called after showing the children of element (before ) +- $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 a5244371a5..158870fa8e 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'); }