Open main menu

Manual:Hooks/UserToolLinksEdit

UserToolLinksEdit
Available from version 1.19.0
Called when generating a list of user tool links, eg "Foobar (Talk | Contribs | Block)"
Define function:
public static function onUserToolLinksEdit( $userId, $userText, &$items ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserToolLinksEdit": "MyExtensionHooks::onUserToolLinksEdit"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserToolLinksEdit'][] = 'MyExtensionHooks::onUserToolLinksEdit';
Called from:File(s): Linker.php

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

DetailsEdit

  • $userId: User id of the current user
  • $userText: User name of the current user
  • &$items: Array of user tool links as HTML fragments