How to edit the registration email sent by buddypress for activating users

ぃ、小莉子 提交于 2019-12-12 02:19:55

问题


I have this message when users register on my site, this is an excerpt of what is sent to the user and the email header message was incomplete. Take a look at what is sent when a user register

Email Subject = "[WWW Sites] Activate \http://1/"

And the email body message reads as below

"Thanks for registering! To complete the activation of your account and blog, please click the following link:

http://www.com/activate/?key=8b9c059db8ae9a5b

After you activate, you can visit your blog here:

\http://1/

So it is this incomplete messages that I would want to edit.

Thanks for your anticipated response


回答1:


You have go through the filter method used in Wordpress Because you can not changed the email text or subject directly from the file because the email are comming from Buddypress core file so you can use the filter method.

Please put below code in your theme functions.php file.

1.) Change the subject for Activation email put below code:

function change_activation_subject($subject) {
    return __( "Change Activate Your Account Subject", 'buddypress' );
}
add_filter('bp_core_activation_signup_user_notification_subject', 'change_activation_subject');

2.) Change the email body for Activation email put below code:

function change_activation_email_body($message) {
        return __( "Change Activate Email body", 'buddypress' );
    }
    add_filter('bp_core_activation_signup_user_notification_subject', 'change_activation_email_body');


来源:https://stackoverflow.com/questions/15016305/how-to-edit-the-registration-email-sent-by-buddypress-for-activating-users

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!