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 ) { ... }
Attach hook:

In extension.json:

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

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineShowDiff'][] = 'MyExtensionHooks::onDifferenceEngineShowDiff';
Called from:File(s): 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.

Details[edit]

  • $differenceEngine: DifferenceEngine object