< Manual:Hooks 
 
      | PageDelete | |
|---|---|
| Available from version 1.37.0 Occurs whenever the software receives a request to delete an article | |
| Define function: | public static function onPageDelete( ProperPageIdentity $page, Authority $deleter, string $reason, StatusValue $status, bool $suppress ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"PageDelete": "MyExtensionHooks::onPageDelete"
	}
}
 | 
| Called from: | File(s): page/DeletePage.php | 
| Interface: | PageDeleteHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:PageDelete extensions.
Details
- $page: the page that is being deleted
- $deleter: the user (object) deleting the article
- $reason: the reason (string) the page is being deleted
- $status: the current status of the deletion
- $suppress: whether the contents of the deleted page will be kept hidden from administrators
See also
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.