From: Sarven Capadisli Date: Thu, 26 Feb 2009 19:56:31 +0000 (+0000) Subject: Hook for setting document content type, charset, language, DOCTYPE and X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7af6f5392be2b847c4c026f2632fc1c900338b81;p=quix0rs-gnu-social.git Hook for setting document content type, charset, language, DOCTYPE and html element properties --- diff --git a/EVENTS.txt b/EVENTS.txt index 37e2203d50..ed461ee9fe 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -88,3 +88,9 @@ StartShowLocalNavBlock: Showing the local nav menu EndShowLocalNavBlock: At the end of the local nav menu - $action: the current action +StartShowHTML: Chance to set document content type, charset, language, DOCTYPE and html element properties +- $action: the current action + +EndShowHTML: Showing after the html element +- $action: the current action + diff --git a/lib/action.php b/lib/action.php index dd7dd44e7f..9c71a153dd 100644 --- a/lib/action.php +++ b/lib/action.php @@ -93,7 +93,10 @@ class Action extends HTMLOutputter // lawsuit */ function showPage() { - $this->startHTML(); + if (Event::handle('StartShowHTML', array($this))) { + $this->startHTML(); + Event::handle('EndShowHTML', array($this)); + } $this->showHead(); $this->showBody(); $this->endHTML();