Open main menu


Available from version 1.17.0
Removed in version 1.18.0
Hook to format a message if you want to override the internal formatter.
Define function:
public static function onFormatUserMessage( $subject, &$text, $signature ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"FormatUserMessage": "MyExtensionHooks::onFormatUserMessage"

For MediaWiki ≤1.25:

$wgHooks['FormatUserMessage'][] = 'MyExtensionHooks::onFormatUserMessage';
Called from:File(s): User.php

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


  • $subject: Title of the message.
  • &$text: Text of the message.
  • $signature: Signature that they would like to leave.