wp.hooks.doAction( 'clanbite.notifications.received', Array<Object> notifications )Fires when a poll or WebSocket message delivers new notifications (not on polls with nothing new).
For a signal on every successful poll, use clanbite.notifications.polled instead.
Action JavaScript
Parameters
$notifications(Array<Object>)New notification objects, newest first (empty when the Points companion mirrors a server-side change).
Example
wp.hooks.addAction( 'clanbite.notifications.received', 'my-plugin/handler', function ( notifications ) {
} );Defined in src/blocks/notifications/notification-bell/view.js
Changelog
| Version | Description |
|---|---|
| 1.3.0 | Updated. |