Jump to content

Manual:Hooks/MovePageCheckPermissions

From mediawiki.org
MovePageCheckPermissions
Available from version 1.25.0
Specify whether the user is allowed to move the page.
Define function:
public static function onMovePageCheckPermissions( Title $oldTitle, Title $newTitle, User $user, $reason, Status $status ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"MovePageCheckPermissions": "MediaWiki\\Extension\\MyExtension\\Hooks::onMovePageCheckPermissions"
	}
}
Called from: File(s): MovePage.php
Interface: MovePageCheckPermissionsHook.php

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

Details

[edit]
  • $oldTitle: Title object of the current (old) location
  • $newTitle: Title object of the new location
  • $user: User making the move
  • $reason: string of the reason provided by the user
  • $status: Status object to pass error messages to