Manual:Hooks/BacklinkCacheGetConditions

From MediaWiki.org
Jump to navigation Jump to search
BacklinkCacheGetConditions
Available from version 1.19.0 (r94435)
allows to set conditions for query when links to certain title
Define function:
public static function onBacklinkCacheGetConditions( $table, $title, &$conditions ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"BacklinkCacheGetConditions": "MyExtensionHooks::onBacklinkCacheGetConditions"
	}
}

For MediaWiki ≤1.25:

$wgHooks['BacklinkCacheGetConditions'][] = 'MyExtensionHooks::onBacklinkCacheGetConditions';
Called from:File(s): cache/BacklinkCache.php

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