wp.hooks.doAction( 'clanbite.notifications.polled', {{ transport: string, response: Object|null, payload: Object|null }} detail )Fires after each successful notification poll (HTTP or WebSocket) so other UI can sync on the same cadence.
The Points companion also fires it with transport: 'synthetic' after it awards points for a button click.
Action JavaScript
Parameters
$detail({{ transport: string, response: Object|null, payload: Object|null }})transportishttp,websocketorsynthetic;responseis the poll REST JSON forhttp;payloadis the message forwebsocket.
Example
wp.hooks.addAction( 'clanbite.notifications.polled', 'my-plugin/handler', function ( detail ) {
} );Defined in src/blocks/notifications/notification-bell/view.js
Changelog
| Version | Description |
|---|---|
| 1.3.0 | Updated. |