[ 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: 423 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.

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

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

since: 1.0.0
return: bool True on success, false on failure.
param: array $args {

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

since: 1.1.0

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

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

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

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

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.

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

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}.

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

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}.

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

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

since: 1.9.0
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.
param: object|bool $friendship Optional Friendship object.

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

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

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

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



Generated: Sat Sep 21 01:01:46 2019 Cross-referenced by PHPXref 0.7.1