Manual:Hooks/ArticlePrepareTextForEdit
ArticlePrepareTextForEdit | |
---|---|
Available from version 1.18.0 (r80428, codereview) Called when preparing text to be saved. | |
Define function: | public static function onArticlePrepareTextForEdit( WikiPage $wikiPage, ParserOptions $parserOptions ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ArticlePrepareTextForEdit": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticlePrepareTextForEdit"
}
}
|
Called from: | File(s): Storage/DerivedPageDataUpdater.php |
Interface: | ArticlePrepareTextForEditHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ArticlePrepareTextForEdit extensions.
Details
edit$wikiPage
: the WikiPage being saved$parserOptions
: parser options to be used for pre-save transformation