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 ) { ... }

*Attach hook:
$wgHooks['DoEditSectionLink'][] = 'fnMyHook';
Called from: Linker.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