From: Roan Kattouw Date: Tue, 29 Jan 2008 15:05:48 +0000 (+0000) Subject: Adding SkinSubPageSubtitle hook on Wiredtape's request. X-Git-Tag: 1.31.0-rc.0~49715 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=b94eff773e33b7b2a6e9ef1bf064bba50bb3b496;p=lhc%2Fweb%2Fwiklou.git Adding SkinSubPageSubtitle hook on Wiredtape's request. --- diff --git a/docs/hooks.txt b/docs/hooks.txt index bb25df90e8..acfc86da74 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -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 diff --git a/includes/Skin.php b/includes/Skin.php index ca5ba11a0e..aba117103b 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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)) {