Jump to content

Manual:Hooks/ParserFirstCallInit/dtp

From mediawiki.org
This page is a translated version of the page Manual:Hooks/ParserFirstCallInit and the translation is 18% complete.
ParserFirstCallInit
Available from 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": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserFirstCallInit"
	}
}
Called from: File(s): parser/Parser.php
Function(s): __construct
Interface: ParserFirstCallInitHook.php

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

Details

  • Parser $parser: Parser object being initialized

Examples

Sabaagi poomitanan do poingkuro pangawit diti gunoon, ongoino intongː

Phabricator

  • phab:T299528 - Deprecate and remove ParserFirstCallInit hook (move hook/tag registration out of Parser constructor)

See also