Opened 3 months ago
Last modified 10 days ago
#59250 new enhancement
New Admin Email subject line should be filterable
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | good-first-bug has-patch has-unit-tests has-testing-info needs-testing |
Focuses: | Cc: |
Description
When a user attempts to update the Administration Email Address (Settings->Reading), they receive an email with a link they must click to confirm the change.
The body of the email is filterable (new_admin_email_content), but sadly the subject is not.
I'm proposing adding a new filter, such as new_admin_email_subject, that lets users customize this message.
For reference, I was looking to make it clearer that there is still action needed (to confirm the change), because I've seen LOTS of situations on our networks where these email updates are started - but never confirmed - likely due to the subject line sounding way more like a confirmation than something that requires action.
Attachments (4)
Change History (13)
#1
@
3 months ago
- Component changed from General to Administration
- Keywords needs-patch good-first-bug added
- Version trunk deleted
#2
@
3 months ago
- Keywords has-patch added; needs-patch removed
Filter "new_admin_email_subject" added
#3
@
8 weeks ago
- Keywords has-unit-tests has-testing-info needs-testing added
Testing Instructions
These steps define how to test the feature or enhancement, and indicates the expected behavior or results.
Steps to Test
- Add function to functions.php:
<?PHP function updated_admin_email_subject() { return 'Filtered Admin Subject'; } add_filter('new_admin_email_subject', 'updated_admin_email_subject');
- Login to to wp-admin dashboard
- Go to the Settings > General page
- Change the Administration Email Address
- Click on Save Changes
Expected Results
Lists each expected result or behavior, i.e. what should happen when running the test(s):
- ✅ E-Mail Received with "Filtered Admin Subject" as the subject line
#5
@
7 weeks ago
In a fresh WordPress 6.3.2 installation I applied the following patch.diff and added the code listed in the Testing Instructions. After changing the admin email address I received an email with the subject "Filtered Admin Subject".
In short: Works as expected ;-)
#6
@
7 weeks ago
On a local fresh WP installation (6.3.2) I tested patch.diff. I added the the testing Code in functions.php and after I changed the admin Email, I received the updated email Subject 'Filtered Admin Subject'.
Works like a charm :)
@
7 weeks ago
Updated the patch to include comments on the filter so that the Code Reference documentation is updated properly.
#7
@
3 weeks ago
I tested the https://core.trac.wordpress.org/attachment/ticket/59250/59520-with-tests-and-comments.diff on the WordPress Core trunk, and it works perfectly.
Just one note: the .diff
patch, in this case, has to be applied to the src
folder instead of the main folder (it would be fine if you are using a regular WordPress install).
#8
follow-up:
↓ 9
@
11 days ago
Hi @xlthlx
I can't find the tests in the src folder. I am using this https://github.com/WordPress/wordpress-develop repo, where should I add the code?
#9
in reply to:
↑ 8
@
10 days ago
Replying to DaNish Ali:
Hi @danish-ali,
I hope I understood your question correctly: the tests are in the tests
folder, not in the src
one.
Hi @xlthlx
I can't find the tests in the src folder. I am using this https://github.com/WordPress/wordpress-develop repo, where should I add the code?
Filter "new_admin_email_subject" added