Open main menu


Available from version 1.16.0
Removed in version 1.29.0
Allow modifying the wikitext that will be used in "Show changes"
Define function:
public static function onEditPageGetDiffText( $editPage, &$newtext ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"EditPageGetDiffText": "MyExtensionHooks::onEditPageGetDiffText"

For MediaWiki ≤1.25:

$wgHooks['EditPageGetDiffText'][] = 'MyExtensionHooks::onEditPageGetDiffText';
Called from:File(s): EditPage.php

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


  • $editPage: The EditPage object
  • &$newtext: wikitext that will be used as "your version"