MediaWiki REL1_35
|
Stable to implement. More...
Public Member Functions | |
onParserOptionsRegister (&$defaults, &$inCacheKey, &$lazyLoad) | |
Use this hook to register additional parser options. | |
Stable to implement.
Definition at line 9 of file ParserOptionsRegisterHook.php.
MediaWiki\Hook\ParserOptionsRegisterHook::onParserOptionsRegister | ( | & | $defaults, |
& | $inCacheKey, | ||
& | $lazyLoad | ||
) |
Use this hook to register additional parser options.
Note that if you change the default value for an option, all existing parser cache entries will be invalid. To avoid bugs, you'll need to handle that somehow (e.g. with the RejectParserCacheValue hook) because MediaWiki won't do it for you.
array | &$defaults | Set the default value for your option here |
array | &$inCacheKey | To fragment the parser cache on your option, set a truthy value in this array, with the key being the option name. |
array | &$lazyLoad | To lazy-initialize your option, set it null in $defaults and set a callable in this array, with the key being the option name. The callable is passed the ParserOptions object and the option name. |
Implemented in MediaWiki\HookContainer\HookRunner.