Manual:Hooks/EditPageGetDiffContent

Category:MediaWiki hooks#EditPageGetDiffContent Category:Hooks added in MediaWiki 1.21.0#EditPageGetDiffContent
EditPageGetDiffContent
Available from version 1.21.0
Allow modifying the wikitext that will be used in "Show changes". Note that it is preferable to implement diff handling for different data types using the ContentHandler facility.
Define function:
public static function onEditPageGetDiffContent( $editPage, &$newtext ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditPageGetDiffContent": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageGetDiffContent"
	}
}
Called from: File(s): editpage/EditPage.phpCategory:MediaWiki hooks included in EditPage.php#EditPageGetDiffContent
Interface: EditPageGetDiffContentHook.php

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

Details

  • $editPage: The EditPage object
  • &$newtext: wikitext that will be used as "your version"
Category:Hooks added in MediaWiki 1.21.0 Category:MediaWiki hooks Category:MediaWiki hooks included in EditPage.php