< Manual:Hooks
ResourceLoaderJqueryMsgModuleMagicWords | |
---|---|
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 |
Interface: | ResourceLoaderJqueryMsgModuleMagicWordsHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:ResourceLoaderJqueryMsgModuleMagicWords extensions.
Details
$context
: ResourceLoaderContext object&$magicWords
: Array of magic words to add to, mapping all-caps magic words to string values based on the context
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.