Open main menu

Manual:Hooks/ParserTestParser

< Manual:Hooks
ParserTestParser
Available from version 1.6.0
called when creating a new instance of Parser for parser tests
Define function:
public static function onParserTestParser( $parser ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ParserTestParser": "MyExtensionHooks::onParserTestParser"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ParserTestParser'][] = 'MyExtensionHooks::onParserTestParser';
Called from:File(s): parserTest.inc, NewParserTest.php

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

DetailsEdit

  • $parser: Parser object created