Open main menu


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 $parser, $text, StripState $stripState ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"ParserAfterParse": "MyExtensionHooks::onParserAfterParse"

For MediaWiki ≤1.25:

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

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


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