Adding SkinSubPageSubtitle hook on Wiredtape's request.
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 29 Jan 2008 15:05:48 +0000 (15:05 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 29 Jan 2008 15:05:48 +0000 (15:05 +0000)
docs/hooks.txt
includes/Skin.php

index bb25df9..acfc86d 100644 (file)
@@ -854,6 +854,12 @@ $skin: Skin object
 &$text: bottomScripts Text
 Append to $text to add additional text/scripts after the stock bottom scripts.
 
+'SkinSubPageSubtitle': At the beginning of Skin::subPageSubtitle()
+$skin: Skin object
+&$subpages: Subpage links HTML
+If false is returned $subpages will be used instead of the HTML subPageSubtitle() generates.
+If true is returned, $subpages will be ignored and the rest of subPageSubtitle() will run.
+
 'SkinTemplateBuildContentActionUrlsAfterSpecialPage': after the single tab  when showing a special page
 $sktemplate: SkinTemplate object
 $content_actions: array of tabs
index ca5ba11..aba1171 100644 (file)
@@ -841,8 +841,11 @@ END;
        }
 
        function subPageSubtitle() {
-               global $wgOut,$wgTitle,$wgNamespacesWithSubpages;
                $subpages = '';
+               if(!wfRunHooks('SkinSubPageSubtitle', array(&$subpages)))
+                       return $retval;
+
+               global $wgOut, $wgTitle, $wgNamespacesWithSubpages;
                if($wgOut->isArticle() && !empty($wgNamespacesWithSubpages[$wgTitle->getNamespace()])) {
                        $ptext=$wgTitle->getPrefixedText();
                        if(preg_match('/\//',$ptext)) {