Handle user notifications
- Basic CSS
- Handle notification view.
- Mark a notification as viewed.
- Handle notification expiration.
- JS Hooks.
do_action('wpunotifications_display_notifications');
do_action('wpunotifications_display_notifications_unread_pill');
add_filter('wpunotifications__notifications', function ($notifications) {
$notifications[] = array(
'message' => 'Hello world',
'user_id' => 3,
'notif_type' => 'success'
);
return $notifications;
});
add_action('wpunotifications__notification_created', function ($args) {
error_log(json_encode($args));
});