Manual:Hooks/TitleMoveComplete
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.37.0</tvar> (after being deprecated in <tvar name=4>1.35.0</tvar>).</translate> <translate> Please see <tvar name=page>PageMoveComplete</tvar> for an alternative way to use this feature.</translate> |
TitleMoveComplete | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 678414)</tvar></translate> Occurs whenever a request to move an article is completed, after the database transaction commits. | |
<translate> Define function:</translate> | public static function onTitleMoveComplete( Title &$title, Title &$newTitle, User &$user, $oldid, $newid, $reason, Revision $revision ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"TitleMoveComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onTitleMoveComplete"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> MovePage.php <translate> Function(s):</translate> MovePage::move() |
<translate> Interface:</translate> | TitleMoveCompleteHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:TitleMoveComplete extensions</tvar>.</translate>
Details
$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)