Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/ParserBeforePreprocess

From mediawiki.org
<Manual:Hooks
ParserBeforePreprocess
Available fromversion 1.35.0 (Gerrit change 589458)
Called at the beginning ofParser::preprocess()
Define function:
publicstaticfunctiononParserBeforePreprocess(Parser$parser,string&$text,StripState$stripState){...}
Attach hook:Inextension.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, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:ParserBeforePreprocess extensions.


Parameters

[edit]
  • $parser: An instance ofParser
  • &$text: A modifiablestring, representing the text to parse
  • $stripState: An instance ofStripState
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/ParserBeforePreprocess&oldid=4718981"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp