[wp-trac] [WordPress Trac] #43706: Email with link to change admin email does not include proposed new email address.

WordPress Trac noreply at wordpress.org
Tue Mar 8 03:54:39 UTC 2022


#43706: Email with link to change admin email does not include proposed new email
address.
-------------------------------------------------+-------------------------
 Reporter:  sshanky                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Users                                |     Version:  4.9.5
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch needs-      |     Focuses:
  refresh                                        |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * keywords:  good-first-bug has-patch => good-first-bug has-patch needs-
     refresh


Comment:

 Thanks for the patch @tremidkhar!

 While changing the `###EMAIL###` placeholder to `###NEW_EMAIL###` makes
 sense, you'll need to include a little bit of work to make sure that the
 code doesn't break for developers using the `new_admin_email_content`
 filter.

 I suggest `###EMAIL###` be considered deprecated in favour of
 `###NEW_EMAIL###`.

 Immediately following the filter a new line of code can be added to
 replace the old with the new, for example:

 {{{#!php
 <?php
 $content = apply_filters( 'new_admin_email_content', $email_text,
 $new_admin_email );
 // EMAIL placeholder has been deprecated in favour of NEW_EMAIL
 placeholder.
 $content = str_replace( '###EMAIL###', '###NEW_EMAIL###', $content );
 }}}

 @SergeyBiryukov @audrasjb @johnbillion  Do you know if a placeholder like
 this has been deprecated in the past? I'm wondering what to do with regard
 to throwing a warning. There doesn't seem to be an appropriate
 `_deprectated_*()` function.

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


More information about the wp-trac mailing list