Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34252 closed enhancement (fixed)

Add `$user_login` and `$user_data` parameters to `retrieve_password_title` filter

Reported by: sudar's profile sudar Owned by: drewapicture's profile DrewAPicture
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Login and Registration Keywords: has-patch
Focuses: Cc:


The retrieve_password_title filter inside retrieve_password function in wp-login.php file allows you to change the email subject of the password reset emails.

Right now it only has tittle as parameter, where as the similar retrieve_password_message filter which is used to modify the email message has both user_login and user_data as parameters.

The patch that I have attached adds these extra parameters to the retrieve_password_title filter.

Usecase where these new parameter would be used: If a plugin/theme wants to change the subject of the password reset email and include user specific information in the title.

Attachments (1)

34252.patch (763 bytes) - added by sudar 9 years ago.

Download all attachments as: .zip

Change History (6)

9 years ago

#1 @sudar
9 years ago

  • Keywords has-patch added

#2 @swissspidy
9 years ago

  • Milestone changed from Awaiting Review to 4.4

Thanks for the patch! Adding these parameters to the filter seems reasonable to me.

#3 @wonderboymusic
9 years ago

  • Owner set to DrewAPicture
  • Status changed from new to assigned

#4 @DrewAPicture
9 years ago

  • Status changed from assigned to accepted

#5 @DrewAPicture
9 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 35093:

Login: Pass the username and WP_User object to the retrieve_password_title filter.

Adding these parameters creates parity with the retrieve_password_message filter, used for modifying the message body of the same password reset email.

Props sudar.
Fixes #34252.

Note: See TracTickets for help on using tickets.