Manual:Hooks/DoEditSectionLink

From MediaWiki.org
Jump to: navigation, search
DoEditSectionLink
Available from version 1.14.0
Override the HTML generated for section edit links.

*Define function:
function fnMyHook( $skin, $title, $section, $tooltip, $result, $lang = false ) { ... }

*Attach hook:
$wgHooks['DoEditSectionLink'][] = 'MyExtensionHooks::someExample';
Called from: Skin.php

*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:DoEditSectionLink extensions.


[edit] Details

  • $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 "&section=$section"
  • $tooltip: The default tooltip. Escape with htmlspecialchars() before using. By default, this is wrapped in the 'editsectionhint' message.
  • $result: The HTML to return, prefilled with the default plus whatever other changes earlier hooks have made
  • $lang: Language code in which the link should be provided.
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox