Manual:Hooks/GetMagicVariableIDs

From mediawiki.org
Jump to navigation Jump to search
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": "MyExtensionHooks::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