bp_get_group_member_is_friend

The BuddyPress bp get group member is friend function.

Description

(mixed|void) bp_get_group_member_is_friend(); 

Returns (mixed|void)


Usage

  1. if ( !function_exists( 'bp_get_group_member_is_friend' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-groups/bp-groups-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_group_member_is_friend(); 
  7.  

Defined (1)

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

/bp-groups/bp-groups-template.php  
  1. function bp_get_group_member_is_friend() { 
  2. global $members_template; 
  3.  
  4. if ( !isset( $members_template->member->is_friend ) ) { 
  5. $friend_status = 'not_friends'; 
  6. } else { 
  7. $friend_status = ( 0 == $members_template->member->is_friend ) 
  8. ? 'pending' 
  9. : 'is_friend'; 
  10.  
  11. /** 
  12. * Filters the friendship status between current user and displayed user in group member loop. 
  13. * @since 1.2.0 
  14. * @param string $friend_status Current status of the friendship. 
  15. */ 
  16. return apply_filters( 'bp_get_group_member_is_friend', $friend_status );