Manual:Hooks/DifferenceEngineRenderRevisionAddParserOutput

From MediaWiki.org
Jump to navigation Jump to search
DifferenceEngineRenderRevisionAddParserOutput
Available from version 1.29.0 (Gerrit change 298026)
Allows extensions to change the parser output. Return false to not add parser output via OutputPage's addParserOutput method.
Define function:
public static function onDifferenceEngineRenderRevisionAddParserOutput( $differenceEngine, $out, $parserOutput, $wikiPage ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"DifferenceEngineRenderRevisionAddParserOutput": "MyExtensionHooks::onDifferenceEngineRenderRevisionAddParserOutput"
	}
}

For MediaWiki ≤1.25:

$wgHooks['DifferenceEngineRenderRevisionAddParserOutput'][] = 'MyExtensionHooks::onDifferenceEngineRenderRevisionAddParserOutput';
Called from:File(s): DifferenceEngine.php
Function(s): renderNewRevision

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

Details[edit]

  • $differenceEngine: DifferenceEngine object
  • $out: OutputPage object
  • $parserOutput: ParserOutput object
  • $wikiPage: WikiPage object