Jump to content

Extension:MobileFrontend/Hooks/BeforeSpecialMobileDiffDisplay

From mediawiki.org
BeforeSpecialMobileDiffDisplay
Available from version 1.22.0 (Gerrit change 86061)
Allow other extensions to load more things onto the display of Special:MobileDiff
Define function:
public static function onBeforeSpecialMobileDiffDisplay( OutputPage &$output, MobileContext $mobileContext, array $revisions ) { ... }
Attach hook:
$wgHooks['BeforeSpecialMobileDiffDisplay'][] = 'MyExtensionHooks::onBeforeSpecialMobileDiffDisplay';
Called from:File(s): MobileFrontend / includes/specials/SpecialMobileDiff.php
Function(s): executeWhenAvailable

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

Details

[edit]
  • &$output: An instance of OutputPage
  • $mobileContext: An instance of MobileContext
  • $revisions: An array of only 2 items, containing a previous revision and next revision. It is either MediaWiki\Revision\RevisionRecord if a revision exists, or null if a revision doesn't exist (defined as RevisionRecord[] | null[])