Real-time Notifications Setup


This document provides instructions for the extension ” Real-time Notifications“. This extension allows users to receive updates and notifications directly on the website as they happen.


Settings #

Extension’s settings #

The extension adds the tab “Notifications” under the page [Ultimate Member > Settings > Extensions] when activated. Once you navigate to the Notifications tab you will see the the options below:

  • Enable real-time instant notification – It is recommended to turn this setting off if your server is getting some load.
  • How often do you want the ajax notifier to check for new notifications? (in seconds) – Set a period of the notifications update. We don’t recommend setting a very small period to avoid the site overload.
  • Where should the notification icon appear? – Select a place where the notification icon should be displayed.
  • Always display the notification icon – If turned off, the icon will only show when there’s a new notification.
  • Notification sound – Play a sound when a new notification appears. It may not work in Chrome due to Autoplay Policy.
  • Turn on or off notifications and edit the templates for the following:
    • Role upgrade
    • New comment reply
    • New user comment
    • New guest comment
    • User view profile
    • Guest view profile
    • User awarded points for action
    • User deducted points for action
    • User receives points from another person
    • User get a new private message
    • User get followed by a person
    • User get a new friend request
    • User get a new friend
    • User get a new wall post
    • User get a new wall comment
    • User get a new post like
    • User get a new mention
    • User account is verified
    • Groups – Approve Member
    • Groups – Join Request
    • Groups – Invite Member
    • Groups – Change Group Role
    • User leaves a reply to bbpress topic
    • Guest leaves a reply to bbpress topic

Pages settings #

Once you install the extension, it creates the page “Notifications”. This page contains a shortcode [ultimatemember_notifications] that shows a list of notifications for the current user.

You can create this page manually if it is lost. Once the page is created, you should configure it using the setting “Notifications page” on the [Ultimate Member > Settings > General > Pages]

User features #

Notification button #

When a user receives notification, a red circle will appear on the notifications button with a number inside. This number indicates how many new notifications are received. Users can view new and past notifications via the notifications button/popup or by going to the notifications page.

Note: The theme “UM Theme” may move the button to the site’s header.

Picture – The notifications button

Picture – The notifications button in theme “UM Theme”

Picture – The notifications popup

Switch notifications ON/OFF #

If the setting ” Account Tab” is turned on under the Notifications settings, users can control what notifications they want to receive from the tab “Web Notifications” in their account page. These includes core notifications as well as installed extension notifications (E.g. User Reviews and myCrRED).

Picture – The tab “Web Notifications”

For developers #

The code samples #

Add your custom notification

Look for an example here: Using notifications API to add custom notifications

Disable the default notification feed button in the footer

Add the code snippet below to the end of the file functions.php in the active theme directory.

add_action( 'init', function() {
	remove_action( 'wp_footer', 'um_notification_show_feed', 99999999999 );
} );