Manual:Hooks/DifferenceEngineShowEmptyOldContent

Category:MediaWiki hooks#DifferenceEngineShowEmptyOldContent Category:Hooks added in MediaWiki 1.29.0#DifferenceEngineShowEmptyOldContent
DifferenceEngineShowEmptyOldContent
Available from version 1.29.0 (Gerrit change 298026)
Allows extensions to change the diff table body (without header) in cases when there is no old revision or the old and new revisions are identical.
Define function:
public static function onDifferenceEngineShowEmptyOldContent( DifferenceEngine $differenceEngine ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"DifferenceEngineShowEmptyOldContent": "MediaWiki\\Extension\\MyExtension\\Hooks::onDifferenceEngineShowEmptyOldContent"
	}
}
Called from: File(s): diff/DifferenceEngine.phpCategory:MediaWiki hooks included in DifferenceEngine.php#DifferenceEngineShowEmptyOldContent
Function(s): getDiffBody
Interface: DifferenceEngineShowEmptyOldContentHook.php

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

Details

  • $differenceEngine: DifferenceEngine object
Category:Hooks added in MediaWiki 1.29.0 Category:MediaWiki hooks Category:MediaWiki hooks included in DifferenceEngine.php