Manual:Hooks/ParserOutputPostCacheTransform: Difference between revisions
Appearance
Content deleted Content added
mNo edit summary |
Fix source namespace |
||
| Line 5: | Line 5: | ||
|summary = Called from <syntaxhighlight lang="php" inline>ParserOutput::getText()</syntaxhighlight> to do post-cache transforms. |
|summary = Called from <syntaxhighlight lang="php" inline>ParserOutput::getText()</syntaxhighlight> to do post-cache transforms. |
||
|args = $parserOutput, &$text, &$options |
|args = $parserOutput, &$text, &$options |
||
|source = ParserOutput.php |
|source = Parser/ParserOutput.php |
||
|sourcefunction = getText |
|sourcefunction = getText |
||
|sourceclass = ParserOutput |
|sourceclass = ParserOutput |
||
Latest revision as of 12:54, 22 December 2025
| 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): Parser/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
[edit | edit source]- $parserOutput: The ParserOutput object.
- &$text: The text being transformed, before core transformations are done.
- &$options: The options array being used for the transformation.