Manual:Hooks/ParserOutputPostCacheTransform: Difference between revisions
Appearance
Content deleted Content added
document hook |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{ |
{{MediaWikiHook |
||
|name = ParserOutputPostCacheTransform |
|name = ParserOutputPostCacheTransform |
||
|version = 1.31.0 |
|version = 1.31.0 |
||
Revision as of 09:38, 4 March 2021
| ParserOutputPostCacheTransform | |
|---|---|
| Available from version 1.31.0 (Gerrit change 393260) Called from ParserOutput::getText() to do post-cache transforms. | |
| Define function: | public static function onParserOutputPostCacheTransform( $parserOutput, &$text, &$options ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"ParserOutputPostCacheTransform": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserOutputPostCacheTransform"
}
}
|
| Called from: | File(s): ParserOutput.php Function(s): getText |
| Interface: | ParserOutputPostCacheTransformHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ParserOutputPostCacheTransform extensions.
Details
- $parserOutput: The ParserOutput object.
- &$text: The text being transformed, before core transformations are done.
- &$options: The options array being used for the transformation.