Manual:Hooks/ParserPreSaveTransformComplete

From mediawiki.org
Jump to navigation Jump to search
ParserPreSaveTransformComplete
Available from version 1.35.0
Called from Parser::preSaveTransform() after processing is complete, giving the extension a chance to further modify the wikitext.
Define function:
public static function onParserPreSaveTransformComplete( Parser $parser, string &$text ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserPreSaveTransformComplete": "MyExtensionHooks::onParserPreSaveTransformComplete"
	}
}
Called from: File(s): parser/Parser.php
Function(s): preSaveTransform
Interface: ParserPreSaveTransformCompleteHook.php

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


Details[edit]

This hook allows extensions to make post-PST adjustments.

  • $parser: Parser object
  • &$text: Transformed text as a string, which can be modified

See also[edit]