Manual:Hooks/ParserBeforeStrip/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:

History
Originally, the MediaWiki Parser performed a first pass which removed elements that shouldn't be processed as wiki text (e.g.  tags, HTML comments,   tags, etc.) from the page text, before processing the remaining wiki text. This process was known as 'stripping'; the stripped content (where relevant) was inserted back into the page at the end of the parse.

There were therefore three parser hooks related to the parsing process. was called before the stripping took place,  was called after the stripping took place, and   was called just prior to the actual parse (and was intended to provide a mechanism to use an alternative parser instead of the standard MW wikitext parser).

In MW 1.14, the 'strip' stage was removed, which meant that there was no difference between  and , so the latter was deprecated. It also meant that the text passed into the hook now contains the full wikitext of the source page, including any  tags, etc.

As of MW 1.36, both  and   were completely removed, so you are now recommended to use   instead of   or   instead of , or possibly one of the other page rendering hooks if they more closely match your requirements.