Manual:Hooks/ParserFirstCallInit/da

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Hooks/ParserFirstCallInit and the translation is 33% complete.

Other languages:
English • ‎dansk • ‎日本語
ParserFirstCallInit
Tilgængelig fra version 1.12.0
called when the parser initializes for the first time
Define function:
public static function onParserFirstCallInit( Parser $parser ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ParserFirstCallInit": "MyExtensionHooks::onParserFirstCallInit"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ParserFirstCallInit'][] = 'MyExtensionHooks::onParserFirstCallInit';
Called from:Fil(er): Parser.php
Funktion(er): firstCallInit

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

Detaljer

  • &$parser: Parser object being cleared

Eksempler

For examples on how this hook should be used, please see Manual:Tag extensions .