[wp-trac] [WordPress Trac] #54690: Add ability to filter whole notification email in retrieve_password

WordPress Trac noreply at wordpress.org
Fri Jan 21 08:30:47 UTC 2022


#54690: Add ability to filter whole notification email in retrieve_password
-------------------------------------------------+-------------------------
 Reporter:  connapptivity                        |       Owner:  audrasjb
     Type:  feature request                      |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.0
Component:  Users                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:  docs
  note                                           |
-------------------------------------------------+-------------------------

Comment (by costdev):

 @SergeyBiryukov I agree that the new `send_retrieve_password_email` filter
 could benefit from receiving `$user_login` and `$user_data`. Nice
 addition!

 For `retrieve_password_notification_email`, my thinking is surrounding
 readability, especially if we decide to add additional data in future. For
 example, `$site_name`.

 Taking both consistency and readability into consideration, and taking
 influence from `wpmu_signup_blog_notification_email`, what about using
 multiline to pass the arguments directly?

 {{{#!php
 <?php

 $notification_email = apply_filters(
     'retrieve_password_notification_email',
     $defaults,
     $key,
     $user_login,
     $user_data
 );
 }}}

 The `$data` variable's definition should also be removed if we're not
 using the compacted array.

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


More information about the wp-trac mailing list