Manual:Hooks/MovePageCheckPermissions

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
English • ‎српски / srpski • ‎日本語
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": "MyExtensionHooks::onMovePageCheckPermissions"
	}
}

For MediaWiki ≤1.25:

$wgHooks['MovePageCheckPermissions'][] = 'MyExtensionHooks::onMovePageCheckPermissions';
Called from:File(s): MovePage.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