Manual:Hooks/SkinTemplateNavigation::SpecialPage
From MediaWiki.org
| SkinTemplateNavigation::SpecialPage | |
|---|---|
| Available from version 1.18.0 (r79358) Called on special pages after the special tab is added but before variants have been added |
|
Define function: |
public static function onSkinTemplateNavigation::SpecialPage( SkinTemplate &$sktemplate, array &$links ) { ... }
|
Attach hook: |
$wgHooks['SkinTemplateNavigation::SpecialPage'][] = 'MyExtensionHooks::onSkinTemplateNavigation::SpecialPage'; |
| Called from: | SkinTemplate.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:SkinTemplateNavigation::SpecialPage extensions.
[edit] Details
- &$sktemplate: SkinTemplate object
- &$links: Structured navigation links
This hook is called just prior to displaying the page navigation links on a Special Page. By modifying &$links you can change the text of the "Special Page" link along with adding other links to the bar.
The following code changes "Special Page" to "My Page" and adds a link to Google.
$links['namespaces']['special']['text'] = 'My Page'; $links['namespaces']['google']['text'] = 'Google'; $links['namespaces']['google']['href'] = 'http://www.google.com/';
| Language: | English • Bahasa Indonesia • 日本語 |
|---|