[wp-trac] [WordPress Trac] #33587: Notification Functions Should be Replaced by Hooks

WordPress Trac noreply at wordpress.org
Sat Sep 12 02:17:01 UTC 2015


#33587: Notification Functions Should be Replaced by Hooks
-------------------------+------------------
 Reporter:  dshanske     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.4
Component:  Mail         |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------
Changes (by boonebgorges):

 * keywords:  has-patch needs-docs => has-patch


Comment:

 These patches are looking good, but I don't like the action names being
 suggested. Action/filter names ought to describe the context of the
 action/filter, not the intended use. Also, I think we can make the code
 flow a bit more logically by using the existing 'comment_post' hook and
 introducing small wrapper functions that do the weird logic from the end
 of `wp_new_comment()`. See [33587.3.diff].

 > There are some more notification functions in multisite, for example
 wpmu_signup_user_notification, wpmu_new_user_notification etc. Should
 those be replaced by hooks, too?

 Yeah, let's do it. Note that those `add_action()` calls should go in ms-
 default-filters.php.

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


More information about the wp-trac mailing list