Manual:Hooks/MagicWordMagicWords

From MediaWiki.org
Jump to navigation Jump to search
MagicWordMagicWords
Available from version 1.6.0
Removed in version 1.19.0
Allows extensions to define new magic words. DEPRECATED: See Manual:Magic words instead.
Define function:
public static function onMagicWordMagicWords( &$magicWords ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"MagicWordMagicWords": "MyExtensionHooks::onMagicWordMagicWords"
	}
}

For MediaWiki ≤1.25:

$wgHooks['MagicWordMagicWords'][] = 'MyExtensionHooks::onMagicWordMagicWords';
Called from:File(s): MagicWord.php

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

Details[edit]

&$magicWords - An array of magic words.

Usage[edit]

See Manual:Magic words.