Extension:Nuke/Hooks/NukeDeletePage

From Linux Web Expert

Revision as of 18:11, 19 March 2020 by imported>Shirayuki (fix)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

NukeDeletePage
Available from version 1.27.0 (Gerrit change 255981)
Allows other extensions to handle the deletion of titles. Return true to let Nuke handle the deletion or false if it was already handled in the hook.
Define function:
public static function onNukeDeletePage( Title $title, string $reason, bool &$deletionResult ) { ... }
Attach hook:
$wgHooks['NukeDeletePage'][] = 'MyExtensionHooks::onNukeDeletePage';
Called from:File(s): Nuke / SpecialNuke.php
Function(s): doDelete

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

Details

  • $title: title to delete
  • $reason: reason given by the user for deletion
  • &$deletionResult: Whether the deletion was successful or not