Manual:Hooks/NewRevisionFromEditComplete
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.37.0</tvar> (after being deprecated in <tvar name=4>1.35.0</tvar>).</translate> <translate> Please see <tvar name=page>RevisionFromEditComplete</tvar> for an alternative way to use this feature.</translate> |
NewRevisionFromEditComplete | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 678414)</tvar></translate> Called when a revision was inserted due to an edit. | |
<translate> Define function:</translate> | public static function onNewRevisionFromEditComplete( WikiPage $wikiPage, Revision $rev, $baseID, User $user ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"NewRevisionFromEditComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onNewRevisionFromEditComplete"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> filerepo/file/LocalFile.php, MovePage.php, page/WikiPage.php, specials/helpers/ImportReporter.php, Storage/PageUpdater.php |
<translate> Interface:</translate> | NewRevisionFromEditCompleteHook.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:NewRevisionFromEditComplete extensions</tvar>.</translate>
Details
WikiPage $wikiPage
: the wiki page edited (WikiPage object) 1.19+Revision $rev
: the new revision (Revision object)int|null $baseID
: the revision ID this was based off, if any. For example, for a rollback, this will be the rev_id that is being rolled back to.User $user
: the revision author (User object)
Categories:
- MediaWiki hooks
- Hooks added in MediaWiki 1.13.0
- Pages with broken file links
- MediaWiki deprecated or obsolete features
- Hooks removed in MediaWiki 1.37.0
- Hooks deprecated in MediaWiki 1.35.0
- Removed hooks
- MediaWiki hooks included in LocalFile.php
- MediaWiki hooks included in MovePage.php
- MediaWiki hooks included in WikiPage.php
- MediaWiki hooks included in ImportReporter.php
- MediaWiki hooks included in PageUpdater.php