Manual:Hooks/AbortMove
This feature was removed from MediaWiki core in version 1.25.0. Please see MovePageIsValidMove for an alternative way to use this feature. |
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)