Commit 2c420cc5 authored by Zach Copley's avatar Zach Copley

New Start/EndHtmlElement events. Allows adding namespaces.

parent 456f4a65
......@@ -365,6 +365,14 @@ GetValidDaemons: Just before determining which daemons to run
HandleQueuedNotice: Handle a queued notice at queue time (or immediately if no queue)
- &$notice: notice to handle
StartHtmlElement: Reight before outputting the HTML element - allows plugins to add namespaces
- $action: the current action
- &$attrs: attributes for the HTML element
EndHtmlElement: Right after outputting the HTML element
- $action: the current action
- &$attrs: attributes for the HTML element
StartShowHeadElements: Right after the <head> tag
- $action: the current action
......
......@@ -119,9 +119,16 @@ class HTMLOutputter extends XMLOutputter
$language = $this->getLanguage();
$this->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml',
'xml:lang' => $language,
'lang' => $language));
$attrs = array(
'xmlns' => 'http://www.w3.org/1999/xhtml',
'xml:lang' => $language,
'lang' => $language
);
if (Event::handle('StartHtmlElement', array($this, &$attrs))) {
$this->elementStart('html', $attrs);
Event::handle('EndHtmlElement', array($this, &$attrs));
}
}
function getLanguage()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment