Manual:Hooks/RevisionInsertComplete

RevisionInsertComplete
Available from version 1.13.0
Called after a revision is inserted into the DB
Define function:
public static function onRevisionInsertComplete( &$revision, $data, $flags ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"RevisionInsertComplete": "MyExtensionHooks::onRevisionInsertComplete"
	}
}
Called from:File(s): Revision.php
Interface:RevisionInsertCompleteHook.php

For more information about attaching hooks, see $1.
For examples of extensions using this hook, see Category:RevisionInsertComplete extensions.

DetailsEdit

  • &$revision: the Revision object
  • $data: URL to external object (deprecated¬†in 1.31.0) Since 1.31.0, this will always return null.
  • $flags: flags for this revision (deprecated¬†in 1.31.0) Since 1.31.0, this will always return null.