$parserOutput: the parserOutput (object) that corresponds to the page
$text: the text that will be displayed, in HTML (string)
-'OutputPageBodyAttrs': called when OutputPage::headElement is creating the body
+'OutputPageBodyAttributes': called when OutputPage::headElement is creating the body
tag to allow for extensions to add attributes to the body of the page they might
need. Or to allow building extensions to add body classes that aren't of high
enough demand to be included in core.
$bodyAttrs['class'] .= ' ' . Sanitizer::escapeClass( 'page-' . $this->getTitle()->getPrefixedText() );
$bodyAttrs['class'] .= ' skin-' . Sanitizer::escapeClass( $wgUser->getSkin()->getSkinName() );
- $sk->bodyAttributes( $this, $bodyAttrs ); // Allow skins to add body attributes they need
- wfRunHooks( 'OutputPageBodyAttrs', array( $this, $sk, &$bodyAttrs ) );
+ $sk->addToBodyAttributes( $this, $bodyAttrs ); // Allow skins to add body attributes they need
+ wfRunHooks( 'OutputPageBodyAttributes', array( $this, $sk, &$bodyAttrs ) );
$ret .= Html::openElement( 'body', $bodyAttrs ) . "\n";
return "$numeric $type $name";
}
-
+
/**
* This will be called by OutputPage::headElement when it is creating the
* <body> tag, skins can override it if they have a need to add in any
* body attributes or classes of their own.
*/
- function bodyAttributes( $out, &$bodyAttrs ) {
+ function addToBodyAttributes( $out, &$bodyAttrs ) {
// does nothing by default
}