Manual:Hooks/ParserAfterUnstrip

From MediaWiki.org
Jump to navigation Jump to search
ParserAfterUnstrip
Available from version 1.26.0 (Gerrit change 181046)
Called after the first unstripGeneral() in Parser::internalParseHalfParsed()
Define function:
public static function onParserAfterUnstrip( Parser &$parser, $text ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ParserAfterUnstrip": "MyExtensionHooks::onParserAfterUnstrip"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ParserAfterUnstrip'][] = 'MyExtensionHooks::onParserAfterUnstrip';
Called from:File(s): parser/Parser.php
Function(s): internalParseHalfParsed

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ParserAfterUnstrip extensions.

Details[edit]

  • &$parser: Parser object being used
  • &$text: text that will be returned