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 ) { ... }

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]

  • $title: old title
  • $newtitle: new title
  • $user: user who did the move
  • $oldid: database ID of the page that's been moved
  • $newid: database ID of the created redirect