Jump to content

Manual:Hooks/LinkTargetIsAlwaysKnownBatch

From mediawiki.org
LinkTargetIsAlwaysKnownBatch
Available from version 1.47.0
Allows overriding default behaviour for determining if a page exists. If $isKnownArr is kept as null, regular checks happen. If it's a boolean, this value is returned by the isKnown method. Checks for multiple titles are allowed (the keys for $links and $isAlwaysKnown are the same).
Define function:
public static function onLinkTargetIsAlwaysKnownBatch( array $links, array &$isAlwaysKnown ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"LinkTargetIsAlwaysKnownBatch": "MediaWiki\\Extension\\MyExtension\\Hooks::onLinkTargetIsAlwaysKnownBatch"
	}
}
Called from: File(s): Page/LinkAlwaysKnownLookup.php
Interface: LinkTargetIsAlwaysKnownBatchHook.php

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