Make Usertext and UserPicturelink clickable

HI there,

The avatar link and the user text have to be clickable. I want to call a function saying where to click. Where can I implement this? Is there a filter? If not in which file/line is the avatar and the text link mentioned?

This should only happen on the actual mesage box, not in the messages overview on the left site.


  • Predrag Dubajic

    Hey Alessandro,

    Hope you're doing well today :slight_smile:

    There's no filter to be used unfortunately but plugin editing is possible, just make sure to save your changes somewhere before performing plugin update once it's available.

    In /wp-content/plugins/private-messaging/app/views/shortcode/_inbox_message.php on line 68 you will see img tag used for sender image which you can wrap with a tag and desired url.

    I'm not sure which part you are referring to with "USERTEXT" but it's all there near the image tag, for example Subject is on line 62, username is on 72 and content is on line 92.

    Hope this helps and let us know if you have any followup questions :slight_smile:

    Best regards,

  • Milan

    Hello @Alessandro Schneider,

    Hope you won't mind me chiming here. :slight_smile:

    What I understand is that you want to tweak email address used while notifying member about message right ? If this is you want then we need to hijack headers of email just before it get sent with email.

    To do so we need to edit core plugin file and as my colleague @Predrag Dubajic stated don't forget to take backup of your changes before you start update process.

    So here are the steps throughout which you'll be able to send notifications with your desired email attached to it. Just make sure its real email address otherwise google spam filters will put your email in spam list. :slight_smile:

    #1) Open /wp-content/plugins/private-messaging/app/controllers/notify-controller.php file and go to line no. 135.

    #2) Comment our code from line no. 135 to 138 and add this just below it and before foreach loop

    $_sitename = 'Site Name';
            $_fromEmail = '';
            $headers = array(
                'From: ' . $_sitename . ' <' . $_fromEmail . '>',
                'Content-Type: text/html; charset=UTF-8'

    So after making above changes notify-controller.php file will look something like attached screenshot.

    I've added two variable in code, $_sitename and $_fromEmail. Update these two according to your preference.

    Thanks for being with us. :slight_smile:

    Let us know if you need help with something else.

    Best Regards,
    Milan Savaliya.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.