Allow selective sending of the "New User" Mails to admins and users#2202
Closed
JanThiel wants to merge 4 commits intoWordPress:trunkfrom
Closed
Allow selective sending of the "New User" Mails to admins and users#2202JanThiel wants to merge 4 commits intoWordPress:trunkfrom
JanThiel wants to merge 4 commits intoWordPress:trunkfrom
Conversation
Contributor
peterwilsoncc
left a comment
There was a problem hiding this comment.
A few coding suggestions and a question inline.
| * | ||
| * @param WP_User $user User object for new user. | ||
| */ | ||
| $send_notification_to_admin = apply_filters( 'send_new_user_notification_email_to_admin', true, $user ); |
Contributor
There was a problem hiding this comment.
Suggested change
| $send_notification_to_admin = apply_filters( 'send_new_user_notification_email_to_admin', true, $user ); | |
| $send_notification_to_admin = apply_filters( 'wp_send_new_user_notification_to_admin', true, $user ); |
| * | ||
| * @param WP_User $user User object for new user. | ||
| */ | ||
| $send_notification_to_user = apply_filters( 'send_new_user_notification_email_to_user', true, $user ); |
Contributor
There was a problem hiding this comment.
Suggested change
| $send_notification_to_user = apply_filters( 'send_new_user_notification_email_to_user', true, $user ); | |
| $send_notification_to_user = apply_filters( 'wp_send_new_user_notification_to_user', true, $user ); |
| 'subject' => __( '[%s] Login Details' ), | ||
| 'message' => $message, | ||
| 'headers' => '', | ||
| 'send' => true, |
Contributor
There was a problem hiding this comment.
I'm unclear what this is for, where is it used in wp_mail()?
🔢 This applies to both set of arguments: for user and admin.
Comment on lines
+2034
to
+2035
| * Filters whether the Admin notification about a new user registration should be send or not. | ||
| * |
Contributor
There was a problem hiding this comment.
Suggested change
| * Filters whether the Admin notification about a new user registration should be send or not. | |
| * | |
| * Filters whether the Admin is notified of a new user registration. | |
| * |
Comment on lines
+2092
to
+2093
| * Filters whether the User notification about a new user registration should be send or not. | ||
| * |
Contributor
There was a problem hiding this comment.
Suggested change
| * Filters whether the User notification about a new user registration should be send or not. | |
| * | |
| * Filters whether the User is notified of a new user registration. | |
| * |
Member
|
Closing this in favour of #2586 which is ahead. Thanks everyone! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow selective sending of the "New User" Mails to admins and users by extending the existing filters by a
sendflag.This allows filters to skip mail sending based on the context and user information.
Trac ticket: https://core.trac.wordpress.org/ticket/54874
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.