class Notification_Rest_Controller extends WP_REST_ControllerREST endpoints for notifications with long polling support.
class final
- Full name
Kernowdev\Clanbite\Extensions\Notification\Notification_Rest_Controller- Extends
WP_REST_Controller
Constants
| Name | Value | Description |
|---|---|---|
DEFAULT_POLL_INTERVAL | 4000 | Default polling interval in milliseconds. |
ACTIVE_POLL_INTERVAL | 1000 | Active polling interval (when there are recent notifications). |
MAX_POLL_WAIT | 25 | Maximum long poll wait time in seconds (worker holds a PHP process for up to this duration when blocking wait is on). |
Methods
delete_item()Delete notification.execute_action()Execute notification action.get_count()Get unread count.get_item()Get single notification.get_items()Get notifications list.get_transport_config()Get transport configuration.mark_all_read()Mark all notifications as read.mark_read()Mark notification as read.notifications_access_permissions_check()Permission callback: authenticated users only (REST cookie/nonce or Application Passwords).poll_updates()Long polling endpoint for real-time updates.register_routes()Register routes.
Defined in inc/extensions/notifications/class-notification-rest-controller.php