Manual:Hooks/MagicWordwgVariableIDs

From Linux Web Expert

MagicWordwgVariableIDs
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Tells MediaWiki that one or more magic word IDs should be treated as variables.
<translate> Define function:</translate>
public static function onMagicWordwgVariableIDs( &$aCustomVariableIds ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"MagicWordwgVariableIDs": "MediaWiki\\Extension\\MyExtension\\Hooks::onMagicWordwgVariableIDs"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> MagicWord.php
<translate> Interface:</translate> MagicWordwgVariableIDsHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:MagicWordwgVariableIDs extensions</tvar>.</translate>

Usage

This function is part of a collection of function hooks used to define custom variables. For an overview of this hook and how it fits into the overall process of defining and registering user defined variables, please see Manual:Variables.

See also