[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-friends/ -> bp-friends-template.php (summary)

BuddyPress Friends Template Functions.

File Size: 771 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 29 functions

  bp_friends_slug()
  bp_get_friends_slug()
  bp_friends_root_slug()
  bp_get_friends_root_slug()
  bp_friends_random_friends()
  bp_friends_random_members()
  bp_friend_search_form()
  bp_member_add_friend_button()
  bp_member_total_friend_count()
  bp_get_member_total_friend_count()
  bp_potential_friend_id()
  bp_get_potential_friend_id()
  bp_is_friend()
  bp_add_friend_button()
  bp_get_add_friend_button()
  bp_get_friend_ids()
  bp_get_friendship_requests()
  bp_friend_friendship_id()
  bp_get_friend_friendship_id()
  bp_friend_accept_request_link()
  bp_get_friend_accept_request_link()
  bp_friend_reject_request_link()
  bp_get_friend_reject_request_link()
  bp_total_friend_count()
  bp_get_total_friend_count()
  bp_friend_total_requests_count()
  bp_friend_get_total_requests_count()
  bp_friends_profile_stats()
  bp_friends_get_profile_stats()

Functions
Functions that are not part of a class:

bp_friends_slug()   X-Ref
Output the friends component slug.

since: 1.5.0

bp_get_friends_slug()   X-Ref
Return the friends component slug.

since: 1.5.0
return: string

bp_friends_root_slug()   X-Ref
Output the friends component root slug.

since: 1.5.0

bp_get_friends_root_slug()   X-Ref
Return the friends component root slug.

since: 1.5.0
return: string

bp_friends_random_friends()   X-Ref
Output a block of random friends.

No longer used in BuddyPress.


bp_friends_random_members( $total_members = 5 )   X-Ref
Pull up a group of random members, and display some profile data about them.

This function is no longer used by BuddyPress core.

param: int $total_members The number of members to retrieve.

bp_friend_search_form()   X-Ref
Display a Friends search form.

No longer used in BuddyPress.


bp_member_add_friend_button()   X-Ref
Output the "Add Friend" button in the member loop.

since: 1.2.6

bp_member_total_friend_count()   X-Ref
Output the friend count for the current member in the loop.

since: 1.2.0

bp_get_member_total_friend_count()   X-Ref
Return the friend count for the current member in the loop.

Return value is a string of the form "x friends".

since: 1.2.0
return: string A string of the form "x friends".

bp_potential_friend_id( $user_id = 0 )   X-Ref
Output the ID of the current user in the friend request loop.

since: 1.2.6
param: int $user_id See {@link bp_get_potential_friend_id()}.

bp_get_potential_friend_id( $user_id = 0 )   X-Ref
Return the ID of current user in the friend request loop.

since: 1.2.6
param: int $user_id Optional. If provided, the function will simply
return: int ID of potential friend.

bp_is_friend( $user_id = 0 )   X-Ref
Check whether a given user is a friend of the logged-in user.

Returns - 'is_friend', 'not_friends', 'pending'.

since: 1.2.6
param: int $user_id ID of the potential friend. Default: the value of
return: bool|string 'is_friend', 'not_friends', or 'pending'.

bp_add_friend_button( $potential_friend_id = 0, $friend_status = false )   X-Ref
Output the Add Friend button.

since: 1.0.0
param: int      $potential_friend_id See {@link bp_get_add_friend_button()}.
param: int|bool $friend_status       See {@link bp_get_add_friend_button()}.

bp_get_add_friend_button( $potential_friend_id = 0, $friend_status = false )   X-Ref
Create the Add Friend button.

since: 1.1.0
param: int  $potential_friend_id ID of the user to whom the button
param: bool $friend_status       Not currently used.
return: bool|string HTML for the Add Friend button. False if already friends.

bp_get_friend_ids( $user_id = 0 )   X-Ref
Get a comma-separated list of IDs of a user's friends.

since: 1.2.0
param: int $user_id Optional. Default: the displayed user's ID, or the
return: bool|string A comma-separated list of friend IDs if any are found,

bp_get_friendship_requests( $user_id = 0 )   X-Ref
Get a user's friendship requests.

Note that we return a 0 if no pending requests are found. This is necessary
because of the structure of the $include parameter in bp_has_members().

since: 1.2.0
param: int $user_id ID of the user whose requests are being retrieved.
return: array|int An array of user IDs if found, or a 0 if none are found.

bp_friend_friendship_id()   X-Ref
Output the ID of the friendship between the logged-in user and the current user in the loop.

since: 1.2.0

bp_get_friend_friendship_id()   X-Ref
Return the ID of the friendship between the logged-in user and the current user in the loop.

since: 1.2.0
return: int ID of the friendship.

bp_friend_accept_request_link()   X-Ref
Output the URL for accepting the current friendship request in the loop.

since: 1.0.0

bp_get_friend_accept_request_link()   X-Ref
Return the URL for accepting the current friendship request in the loop.

since: 1.0.0
return: string accept-friendship URL.

bp_friend_reject_request_link()   X-Ref
Output the URL for rejecting the current friendship request in the loop.

since: 1.0.0

bp_get_friend_reject_request_link()   X-Ref
Return the URL for rejecting the current friendship request in the loop.

since: 1.0.0
return: string reject-friendship URL.

bp_total_friend_count( $user_id = 0 )   X-Ref
Output the total friend count for a given user.

since: 1.2.0
param: int $user_id See {@link friends_get_total_friend_count()}.

bp_get_total_friend_count( $user_id = 0 )   X-Ref
Return the total friend count for a given user.

since: 1.2.0
param: int $user_id See {@link friends_get_total_friend_count()}.
return: int Total friend count.

bp_friend_total_requests_count( $user_id = 0 )   X-Ref
Output the total friendship request count for a given user.

since: 1.2.0
param: int $user_id ID of the user whose requests are being counted.

bp_friend_get_total_requests_count( $user_id = 0 )   X-Ref
Return the total friendship request count for a given user.

since: 1.2.0
param: int $user_id ID of the user whose requests are being counted.
return: int Friend count.

bp_friends_profile_stats( $args = '' )   X-Ref
Display the number of friends in user's profile.

since: 2.0.0
param: array|string $args before|after|user_id.

bp_friends_get_profile_stats( $args = '' )   X-Ref
Return the number of friends in user's profile.

since: 2.0.0
param: array|string $args before|after|user_id.
return: string HTML for stats output.



Generated: Sat Dec 14 01:00:55 2024 Cross-referenced by PHPXref 0.7.1