Manual:Hooks/DiffViewHeader

From MediaWiki.org

Jump to: navigation, search
DiffViewHeader
Available from version 1.7.0
Called before diff display

*Define function:
function fnMyHook( $diff, $oldRev, $newRev ) { ... }

*Attach hook:
$wgHooks['DiffViewHeader'][] = 'fnMyHook';
Called from: DifferenceEngine.php

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


[edit] Details

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