Jump to content

Manual:Hooks/GetMagicVariableIDs

From mediawiki.org
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): 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

[edit]
  • &$variableIDs: Array of magic word identifiers