Opened 11 years ago
Closed 10 years ago
#27577 closed enhancement (wontfix)
Inconsistent hook names in `wp_trash_post()` and `wp_untrash_post()`
Reported by: | Denis-de-Bernardy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
In wp_trash_post()
, they are:
wp_trash_post
trashed_post
But in wp_untrash_post()
, they are:
untrash_post
untrashed_post
Change History (3)
Note: See
TracTickets for help on using
tickets.
That's because 'trash' is a status and thus wp_transition_post_status() generates a 'trash_post' hook dynamically.
I wouldn't have tiptoed around it with "wp_trash_post" (I would have done all of them a different way that would have allowed for consistency), but these just barely predated my involvement in core.