Jump to content

Manual:Hooks/MagicWordMagicWords

From mediawiki.org
MagicWordMagicWords
Available from version 1.6.0
Removed in version 1.19.0
Allows extensions to define new magic words.
Define function:
public static function onMagicWordMagicWords( &$magicWords ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"MagicWordMagicWords": "MediaWiki\\Extension\\MyExtension\\Hooks::onMagicWordMagicWords"
	}
}
Called from: File(s): MagicWord.php
Interface: MagicWordMagicWordsHook.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.