I’m trying to filter new message email content. I need to change only the first line “%1$s sent you a new message” but I receive the content, subject and the link empty. Do I have to add values for them in the filter also and I if I have to how can I get them
function change_bp_new_message_email_content($email_content) {
return sprintf( __('You have one new message', 'buddypress' ), $sender_name, $subject, $content, $message_link ). "\n" .sprintf( __('Subject:%1$s', 'buddypress' ),$subject). "\n" .sprintf( __('Content: %1$s', 'buddypress' ),$content). "\n\n" .sprintf( __('To view and read the message please login on this link: %1$s', 'buddypress' ), $message_link);
}
add_filter('messages_notification_new_message_message', 'change_bp_new_message_email_content');
Please help. Thanks