Jump to content


From mediawiki.org
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, 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.


  • $wikiPage: The WikiPage that was edited
  • $rev: New revision, instance of MediaWiki\Revision\RevisionRecord
  • $originalRevId: An int or bool. 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 of MediaWiki\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.

This hook has replaced the deprecated hook NewRevisionFromEditComplete .