Clean up names of my bodyAttr hooks on Brion's recomendation.
authorDaniel Friesen <dantman@users.mediawiki.org>
Mon, 4 Oct 2010 05:38:48 +0000 (05:38 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Mon, 4 Oct 2010 05:38:48 +0000 (05:38 +0000)
docs/hooks.txt
includes/OutputPage.php
includes/Skin.php

index 4e27541..d4d6bb1 100644 (file)
@@ -1193,7 +1193,7 @@ the resulting HTML is about to be displayed.
 $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.
index 866b4e5..2a6030d 100644 (file)
@@ -2276,8 +2276,8 @@ class OutputPage {
                $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";
 
index 0ccd2f1..2012588 100644 (file)
@@ -568,13 +568,13 @@ class Skin extends Linker {
 
                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
        }