Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#39788 closed enhancement (fixed)

Add documentation to the `retrieve_password_message` filter that returning empty messages stops email

Reported by: sudar Owned by: SergeyBiryukov
Priority: normal Milestone: 4.8
Component: Login and Registration Version: 4.8
Severity: normal Keywords: has-patch
Cc: Focuses: docs

Description

When a user resets his password, WordPress sents the password reset email.

Both retrieve_password_message and retrieve_password_title filters are exposed to provide plugins an ability to customize the title or message of the password reset emails.

If the retrieve_password_message filter returns an empty string for message, then the email itself is not sent. The code at ​https://github.com/WordPress/WordPress/blob/master/wp-login.php#L372 checks for this condition.

This is not documented anywhere. We should ideally document it by adding it to the phpdoc block of the filter so that it is reflected in the developer docs.

I am attaching a patch that adds this documentation to the phpdoc block.

Attachments (1)

39788.patch​ (429 bytes ) - added by sudar 10 years ago.

Download all attachments as: .zip

Change History (4)

@sudar
10 years ago

#1 @sudar
10 years ago

  • Keywords has-patch added

Both retrieve_password_message and retrieve_password_title filters are exposed to provide plugins an ability to customize the title or message of the password reset emails.

exposed was a wrong word choice in my above message, since people might associate it with security or vulnerabilities. What I meant was the following.

Both retrieve_password_message and retrieve_password_title filters can be used by plugins to customize the title or message of the password reset emails.

#2 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review → 4.8

#3 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 40048:

Docs: Add a note to retrieve_password_message filter that password reset email will not be sent if the filtered message is empty.

Props sudar.
Fixes #39788.

Note: See TracTickets for help on using tickets.