Manual:Hooks/FormatUserMessage

From mediawiki.org
Jump to navigation Jump to search
FormatUserMessage
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"
	}
}
Called from: File(s): User.php
Interface: FormatUserMessageHook.php

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


Details[edit]

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