Hi @alanjs90,
Avatar tags aren’t supported by default by bbpnns. I might actually add support for it in a future release, though.
However, in the meantime, you can include the following code to your functions.php and use the tag [my_author_avatar]
.
add_filter( 'bbpnns_available_topic_tags', 'my_register_bbpnns_avatar_support', 11, 1);
add_filter( 'bbpnns_available_reply_tags', 'my_register_bbpnns_avatar_support', 11, 1 );
add_filter( 'bbpnns_filter_email_body_for_user', 'my_bbpnns_avatar_support', 11, 5 );
function my_register_bbpnns_avatar_support( $tags='' )
{
$my_tags = '[my_author_avatar]';
return $tags . $my_tags;
}
function my_bbpnns_avatar_support( $body, $user_info, $type, $post_id, $forum_id )
{
if ( false === strpos( $body, '[my_author_avatar]' ) )
{
return $body;
}
$avatar = 'topic' === $type ? bbp_get_topic_author_avatar( $post_id, $size = 40 ) : bbp_get_reply_author_avatar( $post_id, $size = 40 );
$body = str_replace( '[my_author_avatar]', $avatar, $body );
return $body;
}
Cheers,
Vinny