Manual:Hooks/TitleMoveStarting
Appearance
From mediawiki.org
| TitleMoveStarting | |
|---|---|
| Available from version 1.27.0 Before moving an article (title), but just after the atomic DB section starts. | |
| Define function: | public static function onTitleMoveStarting( Title &$title, Title &$newtitle, User &$user ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "TitleMoveStarting":"MediaWiki\\Extension\\MyExtension\\Hooks::onTitleMoveStarting" } } |
| Called from: | File(s): Title.php Function(s): Title::moveTo() |
| Interface: | TitleMoveStartingHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:TitleMoveStarting extensions.
This hook is in Title::moveTo(), which is called from SpecialMovepage.php and ApiMove.php .
Details
[edit ]- $title: old Title
- $newtitle: new Title
- $user: User who is doing the move