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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
exposedwas a wrong word choice in my above message, since people might associate it with security or vulnerabilities. What I meant was the following.