Manual:Hooks/TitleMoveComplete

From MediaWiki.org
Jump to: navigation, search
TitleMoveComplete
Available from version 1.4.0
Occurs whenever a request to move an article is completed.

Define function:
public static function onTitleMoveComplete( Title &$title, Title &$newtitle, User &$user, $oldid, $newid, $reason ) { ... }

Attach hook:
$wgHooks['TitleMoveComplete'][] = 'MyExtensionHooks::onTitleMoveComplete';
Called from: Title.php

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


Details[edit | edit source]

  • $title: old Title
  • $newtitle: new Title
  • $user: User who did the move
  • $oldid: database page_id of the page that's been moved
  • $newid: database page_id of the created redirect, or 0 if the redirect was suppressed.
  • $reason: reason for the move; added in git #6f106156 (version 1.23)