Manual:Hooks/ParserPreSaveTransformComplete
From Linux Web Expert
ParserPreSaveTransformComplete | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Called from Parser::preSaveTransform() after processing is complete, giving the extension a chance to further modify the wikitext. | |
<translate> Define function:</translate> | public static function onParserPreSaveTransformComplete( Parser $parser, string &$text ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ParserPreSaveTransformComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserPreSaveTransformComplete"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> parser/Parser.php <translate> Function(s):</translate> preSaveTransform |
<translate> Interface:</translate> | ParserPreSaveTransformCompleteHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserPreSaveTransformComplete extensions</tvar>.</translate>
Details
This hook allows extensions to make post-PST adjustments.
$parser
: Parser object&$text
: Transformed text as a string, which can be modified