Open main menu

Manual:Hooks/AbortMove

AbortMove
Available from version 1.12.0
Removed in version 1.25.0
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": "MyExtensionHooks::onAbortMove"
	}
}

For MediaWiki ≤1.25:

$wgHooks['AbortMove'][] = 'MyExtensionHooks::onAbortMove';
Called from:File(s): Title.php
Function(s): isValidMoveOperation

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

DetailsEdit

  • $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 alsoEdit