Open main menu


Available from version 1.0.0
Last chance to change content of Difference page before output
Define function:
public static function onBeforeSpecialMobileDiffDisplay( OutputPage &$output, MobileContext $ctx, array $revisions ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"BeforeSpecialMobileDiffDisplay": "MyExtensionHooks::onBeforeSpecialMobileDiffDisplay"

For MediaWiki ≤1.25:

$wgHooks['BeforeSpecialMobileDiffDisplay'][] = 'MyExtensionHooks::onBeforeSpecialMobileDiffDisplay';
Called from:File(s): MobileFrontend extension/SpecialMobileDiff.php

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


  • &$output: OutputPage
  • $ctx: MobileContext
  • $revisions: array of revisions to compare ($revisions[1] -> Revision; $revisions[0] -> previous Revision)