Manual:Hooks/AbortMove

AbortMove
Available from version 1.12.0
Removed in version 1.25.0 (Gerrit change 166175)
Allows canceling the move of one title to another
Define function:
public static function onAbortMove( Title $oldTitle, Title $newTitle, User $user, &$error, $reason ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"AbortMove": "MediaWiki\\Extension\\MyExtension\\Hooks::onAbortMove"
	}
}
Called from: File(s): Title.php
Function(s): isValidMoveOperation
Interface: AbortMoveHook.php

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


Details

edit
  • $oldTitle: Title that is being moved
  • $newTitle: Destination Title
  • $user: User requesting the move
  • &$error: Error message (if function returns false)
  • $reason: Reason for the move (added in version 1.13)

See also

edit