Manual:Hooks/ParserAfterParse

From MediaWiki.org
Jump to: navigation, search
ParserAfterParse
Available from version 1.20.0
Called from Parser::parse() just after the call to Parser::internalParse() returns.
Define function:
public static function onParserAfterParse( $parser, $text, $stripState ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ParserAfterParse": [
			"MyExtensionHooks::onParserAfterParse"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['ParserAfterParse'][] = 'MyExtensionHooks::onParserAfterParse';
Called from: File(s): Parser.php

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

Details[edit]

  • $parser: parser object
  • $text: text being parsed
  • $stripState: stripState used (object)