Manual:Hooks/SpecialWhatLinksHereLinks

From MediaWiki.org
Jump to navigation Jump to search
SpecialWhatLinksHereLinks
Available from version 1.26.0
Called every time a list of links is built for a list item for Special:WhatLinksHere
Define function:
public static function onSpecialWhatLinksHereLinks( &$list ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialWhatLinksHereLinks": "MyExtensionHooks::onSpecialWhatLinksHereLinks"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialWhatLinksHereLinks'][] = 'MyExtensionHooks::onSpecialWhatLinksHereLinks';
Called from:File(s): SpecialWhatLinksHere.php

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

Details[edit]

  • &$list: Array of already added links

Usage[edit]

This hook can be used to add, remove or change the target of a link, which will be added after every list item on Special:WhatLinksHere.