Podręcznik:$wgParserOutputHooks

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgParserOutputHooks and the translation is 25% complete.

Other languages:
English • ‎magyar • ‎polski • ‎日本語
Rozszerzenia: $wgParserOutputHooks
Parser output hooks.
Wprowadzono w wersji:1.11.0
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:(array)
Domyślna wartość:[]

Szczegóły

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 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 ) { 
  /*...*/
}