MediaWiki master
MediaWiki\Message\Hook\MessagePostProcessHtmlHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onMessagePostProcessHtml (&$value, $format, $key)
 This hook is called after a message is formatted as HTML.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "MessagePostProcessHtml" to register handlers implementing this interface. If you just want to replace a message, use the MessagesPreLoad hook instead.

Stability: stable
to implement

Definition at line 13 of file MessagePostProcessHtmlHook.php.

Member Function Documentation

◆ onMessagePostProcessHtml()

MediaWiki\Message\Hook\MessagePostProcessHtmlHook::onMessagePostProcessHtml ( & $value,
$format,
$key )

This hook is called after a message is formatted as HTML.

Use this hook if you wish to post process the message. The final value of $value will be used as HTML, so be careful not to introduce XSS. This hook will not be called for messages formatted early in MW initialization.

Since
1.45
Parameters
string&$valueFormatted value of message.
string$formatOne of Message::FORMAT_PARSE, Message::FORMAT_BLOCK_PARSE, Message::FORMAT_ESCAPED.
string$keyMessage key this is for (RawMessage uses value).

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: