How to show new private message badge on custom ui

Hello,

I have develop a wordpress install that does not use the default admin menus on the front-end. I was wondering if you could tell me how I can receive a new message notification via the system so that I can display it in my custom UI?

Thanks,
Tristan

  • Kasia Swiderska

    Hello Tristan,

    Function that shows notifications in admin bar and adds links to compose message or view inbox is placed in /wp-content/plugins/private-messaging/app/controllers/admin-bar-notification-controller.php in line 40. It is function notification_buttons() - so you would need to use that to add it to your custom solution.
    As you can see it uses default WordPress action

    add_action('admin_bar_menu', array(&$this, 'notification_buttons'), 80);

    to place those links in admin bar - so you could us it the same way but with your custom solutions actions.

    Let me know if you have more questions.

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.