Last active
March 11, 2020 09:37
-
-
Save wpconsulate/6074c7ce04d87433fdc1d4f48cf29d43 to your computer and use it in GitHub Desktop.
Wordpress Activation Email Subject + Contents Update
This file contains 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
<?php | |
/* | |
* Change the Subject of the Email Confirmation Email sent to user | |
*/ | |
add_filter ( 'wppb_signup_user_notification_email_subject', 'wppbc_custom_email_confirmation_subject', 20, 8 ); | |
function wppbc_custom_email_confirmation_subject($subject, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, $context ){ | |
// $default_message = sprintf( __( '[%1$s] Activate %2$s', 'profile-builder'), $from_name, $user ); | |
$new_message = sprintf( __( '[%1$s] Activate your account', 'profile-builder'), $from_name); | |
return $new_message; | |
} | |
/* | |
* Change the Content of the Email Confirmation Email sent to user | |
*/ | |
add_filter ( 'wppb_signup_user_notification_email_content', 'wppbc_custom_email_confirmation2', 20, 8 ); | |
function wppbc_custom_email_confirmation2 ($message, $user_email, $user, $activation_key, $registration_page_url, $meta, $from_name, $context ){ | |
$new_message = sprintf( __( "Custom Text. To activate your user, please click the following link:\n\n%s%s%s\n\n.", "profilebuilder" ), '<a href="'.$registration_page_url.'">', $registration_page_url, '</a>.' ); | |
return $new_message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment