Manual:Hooks/TitleMoveComplete
Jump to navigation
Jump to search
![]() | This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.35.0. Please see PageMoveComplete for an alternative way to use this feature. |
TitleMoveComplete | |
---|---|
Available from version 1.4.0 Occurs whenever a request to move an article is completed, after the database transaction commits. | |
Define function: | public static function onTitleMoveComplete( Title &$title, Title &$newTitle, User &$user, $oldid, $newid, $reason, Revision $revision ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"TitleMoveComplete": "MyExtensionHooks::onTitleMoveComplete"
}
}
|
Called from: | File(s): MovePage.php Function(s): MovePage::move() |
Interface: | TitleMoveCompleteHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:TitleMoveComplete extensions.
Details[edit]
$title
: oldTitle
$newTitle
: newTitle
$user
: User who did the move$oldid
: databasepage_id
of the page that's been moved$newid
: databasepage_id
of the created redirect, or 0 if the redirect was suppressed.$reason
: reason for the move; added in git #6f106156 (version 1.23)$revision
: revision created by the move; added in git #9cc2f62b (version 1.27)