Opened 6 years ago
Closed 6 years ago
#44382 closed defect (bug) (fixed)
Filter the subject within _wp_privacy_send_request_confirmation_notification
Reported by: | garrett-eclipse | Owned by: | azaozz |
---|---|---|---|
Milestone: | 4.9.8 | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Privacy | Keywords: | has-patch commit fixed-major |
Focuses: | Cc: |
Description
Hello,
Looks like a filter was missed for the $subject found within _wp_privacy_send_request_confirmation_notification(). It should match the filter found in wp_send_user_request
/** * Filters the subject of the email sent when an account action is attempted. * * @since 4.9.6 * * @param string $subject The email subject. * @param string $blogname The name of the site. * @param array $email_data { * Data relating to the account action email. * * @type WP_User_Request $request User request object. * @type string $email The email address this is being sent to. * @type string $description Description of the action being performed so the user knows what the email is for. * @type string $confirm_url The link to click on to confirm the account action. * @type string $sitename The site name sending the mail. * @type string $siteurl The site URL sending the mail. * } */ $subject = apply_filters( 'user_request_action_email_subject', $subject, $blogname, $email_data );
Cheers
Attachments (2)
Change History (14)
#1
@
6 years ago
- Component changed from General to Privacy
- Focuses privacy added
- Version set to trunk
#3
@
6 years ago
Thanks @birgire I like it and did notice the difference in placement good catch there.
#4
@
6 years ago
- Focuses privacy removed
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 4.9.7
- Version changed from trunk to 4.9.6
This looks good to me. In 44382.2.diff I added documentation for $admin_email
in the $email_data
array for the new filter. This was also missing from the user_confirmed_action_email_content
filter directly above.
One thing I noticed looking at this is an inconsistent use of blogname
and sitename
in these emails. I am going to open a new ticket for this though.
@garrett-eclipse for future reference, the Version
field in Trac should be the earliest affected version of WordPress (4.9.6 in this instance), and you don't have to assign the privacy focus if the component is also Privacy. Thanks for all the great tickets!
This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.
6 years ago
#7
@
6 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In 43373:
#8
@
6 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopen for 4.9.7.
#9
@
6 years ago
- Milestone changed from 4.9.7 to 4.9.8
4.9.7 has been released, moving to next milestone.
Yes, it looks like it's missing.
44382.diff is a suggestion that adds the filter
user_request_confirmed_email_subject
for the subject of the user request confirmation email.It also moves the
$subject
assigning down, to have it near the new filter, similar towp_send_user_request()
. It looks save to me. I will though most likely revert this to keep the patch as simple as possible. Just wanted to get some opinion on this ;-)@garrett-eclipse What do you think about that?
PS: A related ticket is #44265, that adds an email subject filter within
_wp_privacy_send_erasure_fulfillment_notification()