Manual:Hooks/DoEditSectionLink
This feature was removed from MediaWiki core in version 1.32.0 (after being deprecated in 1.25.0). Please see SkinEditSectionLinks for an alternative way to use this feature. |
DoEditSectionLink | |
---|---|
Available from version 1.14.0 Removed in version 1.32.0 (Gerrit change 465783) Override the HTML generated for section edit links. | |
Define function: | public static function onDoEditSectionLink( $skin, $title, $section, $tooltip, &$result, $lang ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"DoEditSectionLink": "MediaWiki\\Extension\\MyExtension\\Hooks::onDoEditSectionLink"
}
}
|
Called from: | File(s): Skin.php Function(s): doEditSectionLink |
Interface: | DoEditSectionLinkHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:DoEditSectionLink extensions.
Details
edit- $skin: Skin object rendering the UI
- $title: Title object for the title being linked to (may not be the same as
$wgTitle
, if the section is included from a template) - $section: The designation of the section being pointed to, to be included in the link, like
§ion=$section
- $tooltip: The default tooltip. Escape with
htmlspecialchars()
before using. By default, this is wrapped in the editsectionhint message. (NOTE: This i18n message is no longer necessary.) - $result: The HTML to return, pre-filled with the default plus whatever other changes earlier hooks have made
- $lang: Language code in which the link should be provided.