If (! Function_exists ('WP _ new_user_notification ')): /** * Login y the blog admin of a new user, normally via email. * * @ Since 2.0 * * @ Param int $ user_id User ID * @ Param string $ plaintext_pass Optional. The user's plaintext password */ Function wp_new_user_notification ($ user_id, $ plaintext_pass = ''){ $ User = get_userdata ($ user_id ); $ User_login = stripslashes ($ user-> user_login ); $ User_email = stripslashes ($ user-> user_email ); // Obtain the blog name $ Blogname = wp_specialchars_decode (get_option ('blogname'), ENT_QUOTES ); // The email content sent to the Postmaster. The content is in HTML format. $ Message = ' // Send an email to the website administrator $ Message_headers = "Content-Type: text/html; charset =" UTF-8 "n "; @ Wp_mail (get_option ('admin _ email '), sprintf (_ (' [% s] New User Registration '), $ blogname), $ message, $ message_headers ); If (empty ($ plaintext_pass )) Return; // You can modify the notification Email sent to new users in HTML format. $ Message = ' // Sprintf (_ ('[% s] Your username and password'), $ blogname) is the Mail title Wp_mail ($ user_email, sprintf (_ ('[% s] Your username and password'), $ blogname), $ message, $ message_headers ); } Endif; |