Manual:Hooks/InterwikiLoadPrefix

Category:MediaWiki hooks#InterwikiLoadPrefix Category:Hooks added in MediaWiki 1.18.0#InterwikiLoadPrefix Category:MediaWiki deprecated or obsolete features#InterwikiLoadPrefix Category:Hooks deprecated in MediaWiki 1.36.0#InterwikiLoadPrefix
InterwikiLoadPrefix
Available from version 1.18.0 (r84173, CodeReview archive)
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onInterwikiLoadPrefix"
	}
}
Called from: File(s): interwiki/Interwiki.phpCategory:MediaWiki hooks included in Interwiki.php#InterwikiLoadPrefix
Interface: InterwikiLoadPrefixHook.php

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

Parameters

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

This hook is not called when $wgInterwikiCache is used.

Notes

  • This does not support enumerating all valid prefixes.
Category:Hooks added in MediaWiki 1.18.0 Category:Hooks deprecated in MediaWiki 1.36.0 Category:MediaWiki deprecated or obsolete features Category:MediaWiki hooks Category:MediaWiki hooks included in Interwiki.php