Manual:Hooks/TitleMoveCompleting
Appearance
From mediawiki.org
Revision as of 22:40, 17 November 2023 by SamanthaNguyen (talk | contribs) (+gerrit changeset for version removed)
This feature was removed from MediaWiki core in version 1.37.0 (after being deprecated in 1.35.0).
Please see PageMoveCompleting for an alternative way to use this feature.
| TitleMoveCompleting | |
|---|---|
| Available from version 1.27.0 Removed in version 1.37.0 (Gerrit change 678414) Occurs whenever a request to move an article is completed, before the database transaction commits. | |
| Define function: | public static function onTitleMoveCompleting( Title $oldTitle, Title $newTitle, User $user, $pageId, $redirId, $reason, Revision $revision ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "TitleMoveCompleting":"MediaWiki\\Extension\\MyExtension\\Hooks::onTitleMoveCompleting" } } |
| Called from: | File(s): Title.php Function(s): MovePage::move() |
| Interface: | TitleMoveCompletingHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:TitleMoveCompleting extensions.
Details
[edit ]- $oldTitle: Title before move
- $newTitle: Title after move
- $user: User who did the move
- $pageId: Database ID of the moved page
- $redirId: Database ID of the created redirect
- $reason: Reason for the move
- $revision: revision created by the move; added in git #9cc2f62b (version 1.27)