Manual:Hooks/EditPageGetDiffContent
From Linux Web Expert
EditPageGetDiffContent | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Allow modifying the wikitext that will be used in "Show changes". Note that it is preferable to implement diff handling for different data types using the ContentHandler facility. | |
<translate> Define function:</translate> | public static function onEditPageGetDiffContent( $editPage, &$newtext ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"EditPageGetDiffContent": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageGetDiffContent"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> EditPage.php |
<translate> Interface:</translate> | EditPageGetDiffContentHook.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:EditPageGetDiffContent extensions</tvar>.</translate>
Details
- $editPage: The EditPage object
- &$newtext: wikitext that will be used as "your version"