Available from version 1.29.0 (Gerrit change 298026)
Allows extensions to affect the diff text which eventually gets sent to the OutputPage object.
Define function:
public static function onDifferenceEngineShowDiff( DifferenceEngine $differenceEngine ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"DifferenceEngineShowDiff": "MyExtensionHooks::onDifferenceEngineShowDiff"

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineShowDiff'][] = 'MyExtensionHooks::onDifferenceEngineShowDiff';
Called from:File(s): diff/DifferenceEngine.php
Function(s): showDiff

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


  • $differenceEngine: DifferenceEngine object