GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Get MediaWiki
  • Get extensions
  • Tech blog
  • Contribute
  • User help
  • FAQ
  • Technical manual
  • Support desk
  • Communication
  • Developer portal
  • Code statistics
  • Community portal
  • Recent changes

This view

  • Original page
  • New address

GeezerVison is showing www.mediawiki.org — Manual:Hooks/ParserFirstCallInit - MediaWiki

< Manual:Hooks
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.

Details

  • Parser $parser: Parser object being initialized

Examples

For examples on how this hook should be used, please see:

  • Manual:Parser functions — using curly braces such as {{#expr: ... }}
  • Manual:Tag extensions — using XML-type tags such as ‎<ref>…‎</ref>

Phabricator

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

See also

  • Manual:ParserFirstCallInitHook.php
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/ParserFirstCallInit&oldid=8299933"
Categories:
  • MediaWiki hooks
  • Hooks added in MediaWiki 1.12.0
  • MediaWiki hooks included in Parser.php
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.