Manual:フック/ParserBeforeStrip
Jump to navigation
Jump to search
![]() | この機能は、(バージョン 1.35.0 で廃止予定になったあと、) バージョン 1.36.0 で完全に除去されました。 |
ParserBeforeStrip | |
---|---|
バージョン 1.5.0 から利用可能 バージョン 1.36.0 内部処理が適用される前に生のウィキ コードを処理するために使用される |
|
関数の定義: |
public static function onParserBeforeStrip( &$parser, &$text, &$strip_state ) { ... }
|
フックのアタッチ: |
{
"Hooks": {
"ParserBeforeStrip": "MyExtensionHooks::onParserBeforeStrip"
}
}
|
呼び出し元: | ファイル: parser/Parser.php |
インターフェイス: | ParserBeforeStripHook.php |
フックの設定についての詳細情報は Manual:フック を参照してください。
このフックを使用する拡張機能の例については、Category:ParserBeforeStrip extensions/ja を参照してください。
詳細
このフックは、キャッシュされたページ コンテンツでは実行されないことに注意してください。 And is also run when parsing system messages in addition to the page text.
$text will hold the text being parsed. To change the text being parsed, modify this value. E.g. to add the phrase "The mighty oracle gives forth this proclamation: " to the front of the text being parsed, you would use the following code:
$text = "The mighty oracle gives forth this proclamation: " . $text;
If you are just adding things to the start/end of a page's body and don't need it to actually be integrated into the parsing process you should consider using a separate hook to add/prepend that content instead.