Hi sandrakgosana
Yes you can do that. recently i have totally changed this plugin using action/filters. so follow this instruction.
// add this function in your active child theme. make sure you need to change your facebook url as per your requirement
function add_email_tag($email_tags) {
$email_tags[] = array(
'tag' => 'facebook_url',
'description' => __( 'Some URL to add to the New User Approve emails' ),
'function' => 'facebook_email_tag_url',
'context' => array( 'email' ),
);
return $email_tags;
}
add_filter( 'nua_email_tags', 'add_email_tag', 5);
// get facebook url based on user id
function facebook_email_tag_url( $attributes ) {
global $wpdb;
$username = $attributes['user_login'];
$user = $attributes['user'];
$fblink= get_the_author_meta('facebook_url', $user->ID);
return $fblink;
}
// modify approve email using action/filters
function custom_approved_email() {
$message = __( 'Thank you for your particpiate at {sitename}', 'new-user-approve' ) . "\r\n\r\n";
$message .= __( 'You have been approved to access {sitename}', 'new-user-approve' ) . "\r\n\r\n";
$message .= "{username}\r\n\r\n";
$message .= "{facebook_url}\r\n\r\n";
$message .= __( 'To set or reset your password, visit the following address:', 'new-user-approve' ) . "\r\n\r\n";
$message .= "{reset_password_url}";
return $message;
}
add_filter( 'new_user_approve_approve_user_message_default', 'custom_approved_email',5);
//here you can change default message, same way you can change other messages as per action/filter
/* default message for login page */
function custom_welcome_message() {
$welcome = sprintf( __( 'Your custom message here.', 'new-user-approve' ), get_option( 'blogname' ) );
return $welcome;
}
add_filter( 'new_user_approve_welcome_message_default', 'custom_welcome_message',5);
so this is solution as per your question. Please add proper facebook url as per your input name in form.
Thanks
Ahir Hemant
-
This reply was modified 6 years, 4 months ago by
Ahir Hemant.
-
This reply was modified 6 years, 4 months ago by
Ahir Hemant.