Manual:Hooks/ParserOptionsRegister
ParserOptionsRegister | |
---|---|
Available from version 1.30.0 allows registering additional parser options | |
Define function: | public static function onParserOptionsRegister( &$defaults, &$inCacheKey, &$lazyLoad ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ParserOptionsRegister": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserOptionsRegister"
}
}
|
Called from: | File(s): parser/ParserOptions.php Function(s): getDefaults |
Interface: | ParserOptionsRegisterHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ParserOptionsRegister extensions.
Parameters
edit- &$defaults: Options and their defaults
- &$inCacheKey: Whether each option splits the parser cache
- &$lazyOptions: Initializers for lazy-loaded options