Manual:Hooks/RevisionInsertComplete

RevisionInsertComplete
Available from version 1.13.0
Removed in version 1.37.0 (Gerrit change 678414)
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onRevisionInsertComplete"
	}
}
Called from: File(s): Revision.php
Interface: RevisionInsertCompleteHook.php

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

Details edit

  • &$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.