Manual:Hooks/MovePageIsValidMove

From MediaWiki.org
Jump to: navigation, search
MovePageIsValidMove
Available from version 1.25.0
Specify whether a page can be moved for technical reasons.
Define function:
public static function onMovePageIsValidMove( Title $oldTitle, Title $newTitle, Status $status ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"MovePageIsValidMove": [
			"MyExtensionHooks::onMovePageIsValidMove"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['MovePageIsValidMove'][] = 'MyExtensionHooks::onMovePageIsValidMove';
Called from: File(s): MovePage.php

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

Details[edit]

  • $oldTitle: Title object of the current (old) location
  • $newTitle: Title object of the new location
  • $status: Status object to pass error messages to