Manual:Hooks/ParserAfterTidy
From MediaWiki.org
< Manual:Hooks(Redirected from Manual:MediaWiki hooks/ParserAfterTidy)
| ParserAfterTidy | |
|---|---|
| Available from version 1.5.0 Used to add some final processing to the fully-rendered page output |
|
*Define function: |
function fnMyHook( &$parser, &$text ) { ... }
|
*Attach hook: |
$wgHooks['ParserAfterTidy'][] = 'fnMyHook'; |
| Called from: | Parser.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:ParserAfterTidy extensions.
[edit] Details
- $parser: Parser object. Can be used to manually parse a portion of wiki text from the $text.
- $text: Represents the text for page. This variable is commonly used to re-introduce html that was earlier embedded in the wiki page's rendering. This is done with search for maker and replace by html content. Such a techniques allows mediawiki extension html output to be unmolested by the parser. See Tag extension example