Manual:Hooks/RevisionFromEditComplete
Appearance
RevisionFromEditComplete | |
---|---|
Available from version 1.35.0 Called when a revision was inserted due to an edit, file upload, import or page move. | |
Define function: | public static function onRevisionFromEditComplete( $wikiPage, $rev, $originalRevId, $user, &$tags ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"RevisionFromEditComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onRevisionFromEditComplete"
}
}
|
Called from: | File(s): Storage/PageUpdater.php, page/WikiPage.php, page/MovePage.php, filerepo/file/LocalFile.php, specials/helpers/ImportReporter.php |
Interface: | RevisionFromEditCompleteHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:RevisionFromEditComplete extensions.
Parameters
[edit]$wikiPage
: TheWikiPage
that was edited$rev
: New revision, instance ofMediaWiki\Revision\RevisionRecord
$originalRevId
: Anint
orbool
. If the edit restores or repeats an earlier revision (such as a rollback or a null revision), the ID of that earlier revision. False otherwise. (Used to be called$baseID
.) See $wgManualRevertSearchRadius for details.$user
: Editing user, instance ofMediaWiki\User\UserIdentity
&$tags
: An array of strings (string[]
). Tags to apply to the edit and recent change. This is empty, and replacement is ignored, in the case of import or page move.
See also
[edit]- This hook has replaced the deprecated hook NewRevisionFromEditComplete .
- PageSaveComplete : called when article has been updated. Only for edits, not null revisions.