Manual:Hooks/ParserBeforeStrip

Article Text
Note that this hook is not run on cached page content. To test it on page content try an edit preview. To ensure you are only acting on page content and not other items, one method is the following (taken from Extension:AutoCategoryInclude):

Note that this hook is generally called more than one time during page rendering. Therefore, you may want to use code such as this to ensure that it only runs once:

$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;