Manual:Hooks/ParserAfterStrip

Category:MediaWiki hooks#ParserAfterStrip Category:Hooks added in MediaWiki 1.5.0#ParserAfterStrip Category:MediaWiki deprecated or obsolete features#ParserAfterStrip Category:Hooks removed in MediaWiki 1.36.0#ParserAfterStrip Category:Hooks deprecated in MediaWiki 1.14.0#ParserAfterStrip
ParserAfterStrip
Available from version 1.5.0
Removed in version 1.36.0 (Gerrit change 622618)Category:Removed hooks#ParserAfterStrip

Define function:
public static function onParserAfterStrip( &$parser, &$text, &$strip_state ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserAfterStrip": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserAfterStrip"
	}
}
Called from: File(s): parser/Parser.phpCategory:MediaWiki hooks included in Parser.php#ParserAfterStrip
Interface: ParserAfterStripHook.php

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

This hook functions identically to ParserBeforeStrip, except it fires after various non-expandable elements (e.g. <nowiki>, HTML comments, etc.) have been stripped from the text.

As of MW 1.14, the hook was deprecated. From this point there is no difference at all between this and ParserBeforeStrip. The hook was removed altogether in MW 1.36.

If you need to apply transformations to the wiki text after the non-expandable elements have been stripped, then you should investigate the InternalParseBeforeLinks. It is not a direct replacement (there are some restrictions on what you can do) but it should handle the majority of use-cases that genuinely need this specific hook.

See also

Category:Hooks added in MediaWiki 1.5.0 Category:Hooks deprecated in MediaWiki 1.14.0 Category:Hooks removed in MediaWiki 1.36.0 Category:MediaWiki deprecated or obsolete features Category:MediaWiki hooks Category:MediaWiki hooks included in Parser.php Category:Removed hooks