Manual:Hooks/ParserBeforePreprocess
Appearance
From mediawiki.org
| ParserBeforePreprocess | |
|---|---|
| Available from version 1.35.0 (Gerrit change 589458) Called at the beginning of Parser::preprocess() | |
| Define function: | public static function onParserBeforePreprocess( Parser $parser, string &$text, StripState $stripState ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "ParserBeforePreprocess":"MediaWiki\\Extension\\MyExtension\\Hooks::onParserBeforePreprocess" } } |
| Called from: | File(s): parser/Parser.php Function(s): preprocess |
| Interface: | ParserBeforePreprocessHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ParserBeforePreprocess extensions.
Parameters
[edit ]$parser: An instance ofParser&$text: A modifiablestring, representing the text to parse$stripState: An instance ofStripState