Manual:$wgParserOutputHooks

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎日本語 • ‎polski
Extensions: $wgParserOutputHooks
Parser output hooks.
Introduced in version: 1.11.0
Removed in version: still in use
Allowed values: array
Default value: array()
Other settings: Alphabetical | By function

Details[edit]

This is an associative array where the key is an extension-defined tag (typically the extension name), and the value is a PHP callback. These will be called as an OutputPageParserOutputManual:Hooks/OutputPageParserOutput hook, if the relevant tag has been registered with the parser output object.

Registration is done with

$pout->addOutputHook( $tag, $data );

The callback has the form:

function outputHook( $outputPage, $parserOutput, $data ) { 
  /*...*/
}