Reply To: Adding Avatar image to Email


Home Forums Front End PM PRO Adding Avatar image to Email Reply To: Adding Avatar image to Email

#26798
shamim
Keymaster

add following code in your theme’s (child theme’s if using) functions.php

add_filter( 'fep_eb_email_legends', function( $legends, $mgs, $user_email ){
	$legends['cus_sender_avatar'] = array(
		'description'  => __('Sender Avatar', 'front-end-pm'),
		'where'        => array( 'newmessage', 'reply' ), //where this tag will be used
		'replace_with' => $mgs ? get_avatar( $mgs->mgs_author, 64 ) : '',
	);
	$legends['cus_receiver_avatar'] = array(
		'description'  => __('Receiver Avatar', 'front-end-pm'),
		'where'        => array( 'newmessage', 'reply' ), //where this tag will be used
		'replace_with' => $mgs ? get_avatar( $user_email, 64 ) : '',
	);
	return $legends;
}, 10, 3);

Then you can use {{cus_sender_avatar}} and {{cus_receiver_avatar}}