Manual:Hooks/OpportunisticLinksUpdate

From MediaWiki.org
Jump to navigation Jump to search
OpportunisticLinksUpdate
Available from version 1.25.0
allows performing updates when a page is re-rendered
Define function:
public static function onOpportunisticLinksUpdate( Page $page, Title $title, parserOutput $parserOutput ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"OpportunisticLinksUpdate": "MyExtensionHooks::onOpportunisticLinksUpdate"
	}
}

For MediaWiki ≤1.25:

$wgHooks['OpportunisticLinksUpdate'][] = 'MyExtensionHooks::onOpportunisticLinksUpdate';
Called from:File(s): page/WikiPage.php
Function(s): triggerOpportunisticLinksUpdate

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