Manual:Hooks/DifferenceEngineShowDiff

From MediaWiki.org
Jump to navigation Jump to search
DifferenceEngineShowDiff
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"
	}
}
Called from:File(s): diff/DifferenceEngine.php
Function(s): showDiff
Interface:DifferenceEngineShowDiffHook.php

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

Details[edit]

  • $differenceEngine: DifferenceEngine object