bp_add_friend_button

Output the Add Friend button.

Description

bp_add_friend_button( (int) $potential_friend_id = 0, (bool) $friend_status = false ); 

Parameters (2)

0. $potential_friend_id — Optional. (int)
The potential friend id.
1. $friend_status — Optional. (bool) => false
The friend status.

Usage

  1. if ( !function_exists( 'bp_add_friend_button' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-friends/bp-friends-template.php'; 
  3.  
  4. // The potential friend id. 
  5. $potential_friend_id = -1; 
  6.  
  7. // The friend status. 
  8. $friend_status = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_add_friend_button($potential_friend_id, $friend_status); 
  12.  

Defined (1)

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

/bp-friends/bp-friends-template.php  
  1. function bp_add_friend_button( $potential_friend_id = 0, $friend_status = false ) { 
  2. echo bp_get_add_friend_button( $potential_friend_id, $friend_status );