Manual:Hooks/NormalizeMessageKey
This feature was removed completely in version 1.27.0. |
NormalizeMessageKey | |
---|---|
Available from version 1.13.0 Removed in version 1.27.0 Allows extensions to change what system message will be displayed on a page | |
Define function: | public static function onNormalizeMessageKey( &$key, &$useDB, &$langCode, &$transform ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"NormalizeMessageKey": "MediaWiki\\Extension\\MyExtension\\Hooks::onNormalizeMessageKey"
}
}
|
Called from: | File(s): GlobalFunctions.php |
Interface: | NormalizeMessageKeyHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:NormalizeMessageKey extensions.
Details
edit- &$key: (string) The message going to be displayed. Change this to display a different message in its place
- &$useDB: (bool) Whether to query the database to get the message
- &$langCode: (string or bool) If a string, the language code that should be used to get the message, if bool true, uses the content language, if bool false, uses the site's default language
- &$transform: (bool) Whether to expand templates and variables in the message
See also
edit- MessageCache::get hook
- MessagesPreLoad hook