Add private message links to your BBPress forum topics and replies.

Do you use Buddypress and BBPress? This function will add a ‘private message’ link to each topic and reply in BBPress. When a user clicks the PM link, they are taken to their BuddyPress messaging page with the message recipient already filled in.

The Code

Set Up

Just add the function into your functions.php. There’s no further set up. You should now see private message links in BBPress posts similar to in this image: