Manual:Hooks/EditPageGetDiffText
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.29.0</tvar> (after being deprecated in <tvar name=4>1.21.0</tvar>).</translate> <translate> Please see <tvar name=page>EditPageGetDiffContent</tvar> for an alternative way to use this feature.</translate> |
EditPageGetDiffText | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (r62740, codereview)</tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar </tvar></translate> Allow modifying the wikitext that will be used in "Show changes" | |
<translate> Define function:</translate> | public static function onEditPageGetDiffText( $editPage, &$newtext ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"EditPageGetDiffText": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageGetDiffText"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> EditPage.php |
<translate> Interface:</translate> | EditPageGetDiffTextHook.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:EditPageGetDiffText extensions</tvar>.</translate>
Details
- $editPage: The EditPage object
- &$newtext: wikitext that will be used as "your version"