| 2885 | /** |
| 2886 | * Filters the contents of the new user email notification sent to the user upon email change. |
| 2887 | * |
| 2888 | * @since unknown |
| 2889 | * |
| 2890 | * @param array $new_user_email_notification { |
| 2891 | * Used to build wp_mail(). |
| 2892 | * |
| 2893 | * @type string $to The intended recipient - New user email address. |
| 2894 | * @type string $subject The subject of the email. |
| 2895 | * @type string $message The body of the email. |
| 2896 | * @type string $headers The headers of the email. |
| 2897 | * } |
| 2898 | * @param WP_User $current_user User object for new user. |
| 2899 | * @param string $sitename The site title. |
| 2900 | */ |
| 2901 | $new_user_email_notification = apply_filters( 'new_user_email_notification', $new_user_email_notification, $current_user, $sitename ); |
| 2902 | |
| 2903 | wp_mail( |
| 2904 | $new_user_email_notification['to'], |
| 2905 | wp_specialchars_decode( sprintf( $new_user_email_notification['subject'], $sitename ) ), |
| 2906 | $new_user_email_notification['message'], |
| 2907 | $new_user_email_notification['headers'] |
| 2908 | ); |
| 2909 | |