Manual:Hooks/DiffViewHeader

DiffViewHeader
Available from version 1.7.0
Removed in version 1.37.0 (Gerrit change 678414)
Called before diff display
Define function:
public static function onDiffViewHeader( $diff, $oldRev, $newRev ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"DiffViewHeader": "MediaWiki\\Extension\\MyExtension\\Hooks::onDiffViewHeader"
	}
}
Called from: File(s): diff/DifferenceEngine.php
Interface: DiffViewHeaderHook.php

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


Details

edit
  • $diff - DifferenceEngine object that's calling
  • $oldRev - Revision object of the "old" revision (may be null/invalid)
  • $newRev - Revision object of the "new" revision