Jump to navigation Jump to search
Available from version 1.29.0 (Gerrit change 344079)
Called in ResourceLoaderJqueryMsgModule to allow adding magic words for jQueryMsg. The key is an all-caps magic word, and the value is a string; values depend only on the ResourceLoaderContext
Define function:
public static function onResourceLoaderJqueryMsgModuleMagicWords( ResourceLoaderContext $context, array &$magicWords ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"ResourceLoaderJqueryMsgModuleMagicWords": "MyExtensionHooks::onResourceLoaderJqueryMsgModuleMagicWords"
Called from:File(s): ../resources/Resources.php
Function(s): ResourceLoaderJqueryMsgModule::getScript

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


  • $context: ResourceLoaderContext object
  • &$magicWords: Array of magic words to add to, mapping all-caps magic words to string values based on the context