Manual:Hooks/MessageCacheReplace

MessageCacheReplace
Available from version 1.15.0
When a message page is changed. Useful for updating caches.
Define function:
public static function onMessageCacheReplace( $title, $text ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"MessageCacheReplace": "MediaWiki\\Extension\\MyExtension\\Hooks::onMessageCacheReplace"
	}
}
Called from: File(s): cache/MessageCache.php
Interface: MessageCacheReplaceHook.php

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

Details

edit
  • $title: name of the page changed.
  • $text: new contents of the page.