Jump to: navigation, search
Available from version 1.24.0 (Gerrit change 67983)
Customize parser output for a given content object, called by AbstractContent::getParserOutput. May be used to override the normal model-specific rendering of page content.
Define function:
public static function onContentGetParserOutput( $content, $title, $revId, $options, $generateHtml, &$output ) { ... }
Attach hook:
$wgHooks['ContentGetParserOutput'][] = 'MyExtensionHooks::onContentGetParserOutput';
Called from: File(s): AbstractContent.php

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


The Content to render
Title of the page, as context
The revision ID, as context
ParserOptions for rendering. To avoid confusing the parser cache, the output can only depend on parameters provided to this hook function, not on global state.
boolean, indicating whether full HTML should be generated. If false, generation of HTML may be skipped, but other information should still be present in the ParserOutput object.
ParserOutput, to manipulate or replace