bp_activity_remove_screen_notifications( int $user_id )
Mark at-mention notifications as read when users visit their Mentions page.
Description Description
Parameters Parameters
- $user_id
-
(Required) The id of the user whose notifications are marked as read.
Source Source
File: bp-activity/bp-activity-notifications.php
function bp_activity_remove_screen_notifications( $user_id = 0 ) {
// Only mark read if the current user is looking at his own mentions.
if ( empty( $user_id ) || (int) $user_id !== (int) bp_loggedin_user_id() ) {
return;
}
bp_notifications_mark_notifications_by_type( $user_id, buddypress()->activity->id, 'new_at_mention' );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Add the $user_id parameter |
| 1.5.0 | Introduced. |