[wp-trac] [WordPress Trac] #27577: Inconsistent hook names in `wp_trash_post()` and `wp_untrash_post()`

WordPress Trac noreply at wordpress.org
Sat Mar 29 07:49:15 UTC 2014


#27577: Inconsistent hook names in `wp_trash_post()` and `wp_untrash_post()`
-------------------------------+------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  2.9
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by nacin):

 * version:  3.8.1 => 2.9


Comment:

 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27577#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list