Jump to content

Manual:Hooks/OpportunisticLinksUpdate

From mediawiki.org
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onOpportunisticLinksUpdate"
	}
}
Called from: File(s): page/WikiPage.php
Function(s): triggerOpportunisticLinksUpdate
Interface: OpportunisticLinksUpdateHook.php

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