Manual:Hooks/DifferenceEngineOldHeaderNoOldRev

From MediaWiki.org
Jump to navigation Jump to search
DifferenceEngineOldHeaderNoOldRev
Available from version 1.29.0 (Gerrit change 298026)
Change the $oldHeader variable in cases when there is no old revision
Define function:
public static function onDifferenceEngineOldHeaderNoOldRev( &$oldHeader ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"DifferenceEngineOldHeaderNoOldRev": "MyExtensionHooks::onDifferenceEngineOldHeaderNoOldRev"
	}
}

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineOldHeaderNoOldRev'][] = 'MyExtensionHooks::onDifferenceEngineOldHeaderNoOldRev';
Called from:File(s): DifferenceEngine.php
Function(s): showDiffPage

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

Details[edit]

  • &$oldHeader: empty string by default