Manual:Hooks/SkinTemplateGetLanguageLink
Appearance
SkinTemplateGetLanguageLink | |
---|---|
Available from version 1.23.0 Allows modification of the data that a language link will be constructed out of. | |
Define function: | public static function onSkinTemplateGetLanguageLink( &$languageLink, $languageLinkTitle, $title ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SkinTemplateGetLanguageLink": "MediaWiki\\Extension\\MyExtension\\Hooks::onSkinTemplateGetLanguageLink"
}
}
|
Called from: | File(s): SkinTemplate.php |
Interface: | SkinTemplateGetLanguageLinkHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SkinTemplateGetLanguageLink extensions.
Allows modification of the data that a language link will be constructed out of.
Details
[edit]Called after building the data for a language link from which the actual html is constructed.
Arguments
[edit]- &$languageLink: array containing data about the link. The following keys can be modified: href, text, title, class, lang, hreflang. Each of them is a string.
- $languageLinkTitle: Title object belonging to the external language link
- $title: Title object of the page the link belongs to