bp_friends_mark_friendship_rejected_notifications_by_item_id

Remove friend request notice when a member rejects another members.

Description

bp_friends_mark_friendship_rejected_notifications_by_item_id( (int) $friendship_id, (object) $friendship ); 

Parameters (2)

0. $friendship_id (int)
Friendship ID (not used).
1. $friendship (object)
Friendship object.

Usage

  1. if ( !function_exists( 'bp_friends_mark_friendship_rejected_notifications_by_item_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-friends/bp-friends-notifications.php'; 
  3.  
  4. // Friendship ID (not used). 
  5. $friendship_id = -1; 
  6.  
  7. // Friendship object. 
  8. $friendship = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_friends_mark_friendship_rejected_notifications_by_item_id($friendship_id, $friendship); 
  12.  

Defined (1)

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

/bp-friends/bp-friends-notifications.php  
  1. function bp_friends_mark_friendship_rejected_notifications_by_item_id( $friendship_id, $friendship ) { 
  2. bp_notifications_mark_notifications_by_item_id( $friendship->friend_user_id, $friendship->initiator_user_id,buddypress)->friends->id, 'friendship_request' );