Opened 7 weeks ago
Last modified 7 weeks ago
#62302 new feature request
Post deletion hooks are not fully consistent.
Reported by: | Cawa-93 | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | Cc: |
Description
We have hooks with a dynamic part like and
deleted_post_{$post->post_type}
, but there is no similar version for before_delete_post.
I suggest adding an equivalent hook before_delete_post_{$post->post_type}
Change History (2)
This ticket was mentioned in PR #7646 on WordPress/wordpress-develop by @Cawa-93.
7 weeks ago
#1
- Keywords has-patch added
7 weeks ago
#2
Technically I think this is fine. But knowing previous tickets, where I suggested to add more filters. It will make sense to elaborate why this benefits the project, what can be achieved by the new hook that could not be done before, or is at least easier now.
This will increase the chances of the ticket being taken care of in my experience.
Note: See
TracTickets for help on using
tickets.
The hook fire before the general
before_delete_post
hook and have the same parameters.It complement the
delete_post_{$post->post_type}
anddeleted_post_{$post->post_type}
hooks.Trac ticket: https://core.trac.wordpress.org/ticket/62302