Opened 3 years ago
Last modified 3 years ago
#11210 new enhancement
Split wp_new_user_notification() into two functions
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Plugins | Version: | 2.9 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | m@…, jeff@…, beau@… |
Description
wp_new_user_notification() sends emails to newly registered user and to admin. One of my plugins (WyPiekacz) redefines it in order to to disable emails sent to admin. Now I want to extend my other plugin (User Locker) so newly registered users will have to activate theirs accounts by clicking on link sent in email. In order to do this, I have to redefine the same function. I how to do this so both plugins could work at the same time - this is not a problem for me.
However it will be better to allow to redefine only part of wp_new_user_notification() function - either one which sends email to new user, or to admin. Therefore I ask to split this function into two new ones. Attached patch does this.
Attachments (2)
Change History (11)
After going through and adding the hooks, your way seems like a better idea. Figured I'd try it and share anyway.
- Keywords needs-patch added; has-patch removed
- Milestone changed from 3.0 to Future Release
combining both ideas gets my vote too.
comment:7
jfarthing84 — 3 years ago
I like the idea by @nacin. It needs some adjustments, but why introduce new functions when the old one can handle it just fine? I need this same functionality as @sirzooro for my plugin "Theme My Login" as well.
See #12184
comment:8
jfarthing84 — 3 years ago
- Cc jeff@… added
comment:9
beaulebens — 3 years ago
- Cc beau@… added
Any movement on this one? Seems like it'd be a good one to have, especially with people building more and more customized network/multi-site installs. Consider me a +1 to the combined approach as well.

Why not just add some hooks instead? That function has none currently.