[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress Friends Activity Functions. These functions handle the recording, deleting and formatting of activity for the user and for this specific component.

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

Defines 11 functions

  friends_record_activity()
  friends_delete_activity()
  friends_register_activity_actions()
  bp_friends_format_activity_action_friendship_accepted()
  bp_friends_format_activity_action_friendship_created()
  bp_friends_prefetch_activity_object_data()
  bp_friends_filter_activity_scope()
  bp_friends_filter_activity_just_me_scope()
  bp_friends_friendship_accepted_activity()
  bp_friends_delete_activity_on_user_delete()
  bp_friends_delete_activity_on_friendship_delete()

Functions
Functions that are not part of a class:

friends_record_activity( $args = '' )   X-Ref
Record an activity item related to the Friends component.

A wrapper for {@link bp_activity_add()} that provides some Friends-specific
defaults.

param: array|string $args {
since: 1.0.0
return: WP_Error|bool|int See {@link bp_activity_add()}.

friends_delete_activity( $args )   X-Ref
Delete an activity item related to the Friends component.

param: array $args {
since: 1.0.0

friends_register_activity_actions()   X-Ref
Register the activity actions for bp-friends.

since: 1.1.0
return: bool False if activity component is not active.

bp_friends_format_activity_action_friendship_accepted( $action, $activity )   X-Ref
Format 'friendship_accepted' activity actions.

param: string $action   Activity action string.
param: object $activity Activity data.
since: 2.0.0
return: string Formatted activity action.

bp_friends_format_activity_action_friendship_created( $action, $activity )   X-Ref
Format 'friendship_created' activity actions.

param: string $action   Static activity action.
param: object $activity Activity data.
since: 2.0.0
return: string Formatted activity action.

bp_friends_prefetch_activity_object_data( $activities )   X-Ref
Fetch data related to friended users at the beginning of an activity loop.

This reduces database overhead during the activity loop.

param: array $activities Array of activity items.
since: 2.0.0
return: array

bp_friends_filter_activity_scope( $retval = array()   X-Ref
Set up activity arguments for use with the 'friends' scope.

For details on the syntax, see {@link BP_Activity_Query}.

param: array $retval Empty array by default.
param: array $filter Current activity arguments.
since: 2.2.0
return: array

bp_friends_filter_activity_just_me_scope( $retval = array()   X-Ref
Set up activity arguments for use with the 'just-me' scope.

For details on the syntax, see {@link BP_Activity_Query}.

param: array $retval Empty array by default.
param: array $filter Current activity arguments.
since: 2.2.0
return: array

bp_friends_friendship_accepted_activity( $friendship_id, $initiator_user_id, $friend_user_id )   X-Ref
Add activity stream items when one members accepts another members request
for virtual friendship.

param: int $friendship_id     ID of the friendship.
param: int $initiator_user_id ID of friendship initiator.
param: int $friend_user_id    ID of user whose friendship is requested.
since: 1.9.0

bp_friends_delete_activity_on_user_delete( $user_id = 0 )   X-Ref
Deletes friendship activity items when a user is deleted.

param: int $user_id The ID of the user being deleted.
since: 2.5.0

bp_friends_delete_activity_on_friendship_delete( $friendship_id )   X-Ref
Remove friendship activity item when a friendship is deleted.

param: int $friendship_id ID of the friendship.
since: 3.2.0



Generated: Sun Dec 22 01:00:54 2024 Cross-referenced by PHPXref 0.7.1