Extension:Comments/Hooks/Comment::delete
Appearance
(Redirected from Manual:Hooks/Comment::delete)
For more information about attaching hooks, see Manual:Hooks.
For examples of other extensions using this hook, see Category:Comment::delete extensions.
The Comment::delete hook is called after a comment has been deleted, right before the Comment::delete method returns a value. The hook provides access to the Comment object ($comment), the ID of the recently deleted comment ($id) and the ID of the page which contains the <code<comments /> tag ($pageId).
As of Q3/2025 the only extension using this hook is LinkFilter: when a comment is deleted from a Link: page, the hook subscriber decrements the link_comment_count field in the link table by one.