Primary responsibility
Opens the in-app notification center showing the user’s history of received notifications. Source-of-truth is wp_mam_notification_history (renamed from wp_tsl_local_app_notifications_history in PR #31, with backward-compat aliases). Read through MAM_Notification_History_Repository.
Settings
| Setting |
Type |
Environment |
Purpose |
show_unread_badge |
yes-no |
global |
Render the badge count on the button |
mark_read_on_open |
yes-no |
global |
Mark all visible notifications as read when the user opens the screen |
empty_state_text |
textarea |
global |
Message when the user has no notifications |
style_* |
various |
per-button |
Colors, icon |
JSON shape
{
"notifications": [
{ "id": "1", "title": "...", "body": "...", "read": false, "ts": "..." },
...
],
"unread_count": 3
}
The badge count comes from unread_count.
Hooks involved
Gotchas
- In-app history is separate from push delivery. A push notification that was sent may not show in the in-app history if the notification type was configured for push-only with
'in_app' disabled.
clean_notifications() runs in phase_finalize and trims the payload to active items — old / deleted notifications are excluded automatically.
- Mark-read-on-open is a write (it updates
wp_mam_notification_history); high-frequency open events have measurable DB load.
Related articles
- Content classes overview
- Notifications overview
- Notification queue and cron
| Field |
Value |
| Article type |
Screen Reference |
| Plugin slug |
mam-main |
| Applies to plugin version |
2.1.11+ |
| Category |
App Settings Reference |
| Audience |
WordPress admin / PHP developer |
| Class name |
local_app_open_notifications_button (frozen) |
| Source file |
includes/content-classes/local-app-open-notifications-content-class.php |
| Last verified |
2026-05-02 |