Manual:Hooks/NewRevisionFromEditComplete
Appearance
This feature was removed from MediaWiki core in version 1.37.0 (after being deprecated in 1.35.0). Please see RevisionFromEditComplete for an alternative way to use this feature. |
NewRevisionFromEditComplete | |
---|---|
Available from version 1.13.0 Removed in version 1.37.0 (Gerrit change 678414) Called when a revision was inserted due to an edit. | |
Define function: | public static function onNewRevisionFromEditComplete( WikiPage $wikiPage, Revision $rev, $baseID, User $user ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"NewRevisionFromEditComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onNewRevisionFromEditComplete"
}
}
|
Called from: | File(s): filerepo/file/LocalFile.php, MovePage.php, page/WikiPage.php, specials/helpers/ImportReporter.php, Storage/PageUpdater.php |
Interface: | NewRevisionFromEditCompleteHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:NewRevisionFromEditComplete extensions.
Details
[edit]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
- 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