Manual:Hooks/InterwikiLoadPrefix

From mediawiki.org
Jump to navigation Jump to search
InterwikiLoadPrefix
Available from version 1.18.0 (r84173)
This hook is called when resolving whether a given prefix is an interwiki or not.
Define function:
public static function onInterwikiLoadPrefix( $prefix, &$interwikiData ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"InterwikiLoadPrefix": "MyExtensionHooks::onInterwikiLoadPrefix"
	}
}
Called from: File(s): interwiki/Interwiki.php
Interface: InterwikiLoadPrefixHook.php

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


Parameters[edit]

Return true without providing an interwiki to continue interwiki search, or false to abort.

This hook is not called when $wgInterwikiCache is used.

Notes[edit]

  • This does not support enumerating all valid prefixes.