[wp-trac] [WordPress Trac] #33932: Filters for Plugin/Theme Update Email Notifications

WordPress Trac noreply at wordpress.org
Sun Sep 20 08:50:35 UTC 2015


#33932: Filters for Plugin/Theme Update Email Notifications
-----------------------------------------+-----------------------------
 Reporter:  ronalfy                      |       Owner:
     Type:  enhancement                  |      Status:  new
 Priority:  normal                       |   Milestone:  Future Release
Component:  Upgrade/Install              |     Version:  3.7
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+-----------------------------
Changes (by johnbillion):

 * keywords:  has-patch => has-patch reporter-feedback
 * focuses:  docs =>
 * component:  General => Upgrade/Install
 * version:  4.3 => 3.7
 * milestone:  Awaiting Review => Future Release


Comment:

 Thanks for the patch, Ronald!

 This filter makes sense. Here's some feedback on your patch:

  * If the filter returns false for one or more of the update types, it
 prevents the email from being sent for all subsequent update types too.
 The `return` statement after the filter should probably be a `continue`.
 Then below the `foreach` loop you could `return` if the `$body` variable
 is empty.
  * The diff should be generated from either the root of your repo so other
 people can apply the patch without having to specify which file is to be
 patched.
  * There's a typo in the docblock: `translators` instead of
 `translations`.
  * Passing `$this` as the third parameter to the filter would be a good
 idea so the filter receives as much context as possible.

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


More information about the wp-trac mailing list