bp_activity_remove_screen_notifications_single_activity_permalink

Mark at-mention notification as read when user visits the activity with the mention.

Description

bp_activity_remove_screen_notifications_single_activity_permalink( (BP_Activity_Activity) $activity ); 

Parameters (1)

0. $activity (BP_Activity_Activity)
Activity object.

Usage

  1. if ( !function_exists( 'bp_activity_remove_screen_notifications_single_activity_permalink' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-notifications.php'; 
  3.  
  4. // Activity object. 
  5. $activity = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_remove_screen_notifications_single_activity_permalink($activity); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-notifications.php  
  1. function bp_activity_remove_screen_notifications_single_activity_permalink( $activity ) { 
  2. if ( ! is_user_logged_in() ) { 
  3. return; 
  4.  
  5. // Mark as read any notifications for the current user related to this activity item. 
  6. bp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), $activity->id,buddypress)->activity->id, 'new_at_mention' );