Opened 12 years ago
Closed 12 years ago
#27577 closed enhancement (wontfix)
Inconsistent hook names in `wp_trash_post()` and `wp_untrash_post()`
| Reported by: | Denis-de-Bernardy | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Posts, Post Types | Version: | 2.9 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
In wp_trash_post(), they are:
wp_trash_posttrashed_post
But in wp_untrash_post(), they are:
untrash_postuntrashed_post
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.