Manual:Hooks/ParserAfterStrip
From MediaWiki.org
This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility.
This feature was deprecated in version 1.14.0 (or possibly earlier).
Since the parser rewrite, this function now behaves identically to ParserBeforeStrip and no longer has special tags (e.g. nowiki, pre, etc.) stripped out first[1].
| ParserAfterStrip | |
|---|---|
| Available from version 1.5.0 |
|
*Define function: |
function fnMyHook( &$parser, &$text, &$strip_state ) { ... }
|
*Attach hook: |
$wgHooks['ParserAfterStrip'][] = 'fnMyHook'; |
| Called from: | Parser.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:ParserAfterStrip extensions.
[edit] Details
$text will hold the text for the page. To change the page text, modify this value. E.g. to add the phrase "The mighty oracle gives forth this proclamation: " to the front of the page text, you would use the following code:
$text = "The mighty oracle gives forth this proclamation: " . $text;