Jump to content

Manual:Hooks/GetMagicVariableIDs

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
GetMagicVariableIDs
Available from version 1.35.0 (Gerrit change 604435)
Use this hook to modify the list of magic variables
Define function:
public static function onGetMagicVariableIDs( &$variableIDs ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"GetMagicVariableIDs": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetMagicVariableIDs"
	}
}
Called from: File(s): Parser/MagicWordFactory.php
Interface: GetMagicVariableIDsHook.php

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

Details

  • &$variableIDs: Array of magic word identifiers