< Manual:Hooks
![]() | This feature was removed completely in version 1.18.0. |
SkinTemplateTabs | |
---|---|
Available from version 1.6.0 (r12033, codereview) Removed in version 1.18.0 | |
Define function: | public static function onSkinTemplateTabs( $skin, &$content_actions ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SkinTemplateTabs": "MyExtensionHooks::onSkinTemplateTabs"
}
}
|
Called from: | File(s): SkinTemplate.php |
Interface: | SkinTemplateTabsHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:SkinTemplateTabs extensions.
If you're wondering why your extension broke with the Vector skin, please see Manual:Hooks/SkinTemplateNavigation. Vector uses a different hook.
Details
Called after building the $content_actions array, but before returning it. The $content_actions array can be modified to add/remove tabs.
Typically if you want to add new tab with caption mytab that has hyperlink to the page http://ex.org/mypage you should add a new element to the $content_actons array in your function :
$content_actions['newtab'] = array (
'class' => false,
'text' => 'mytab',
'href' => 'http://ex.org/mypage',
);
- Tip: Always return true, otherwise other extensions that have hooked this event will not function properly!
Arguments
- $skin: the skin it was called from
- $content_actions: The array of content actions. Each content action is an array that includes text of the caption of the tab and hyperlink.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.