[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

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

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

Defines 17 functions

  groups_register_activity_actions()
  bp_groups_get_activity_group()
  bp_groups_format_activity_action_created_group()
  bp_groups_format_activity_action_joined_group()
  bp_groups_format_activity_action_group_details_updated()
  bp_groups_format_activity_action_group_activity_update()
  bp_groups_prefetch_activity_object_data()
  bp_groups_filter_activity_scope()
  bp_groups_filter_activity_favorites_scope()
  groups_record_activity()
  groups_post_update()
  bp_groups_filter_activity_can_comment()
  bp_groups_filter_activity_can_comment_reply()
  bp_groups_membership_accepted_add_activity()
  bp_groups_group_details_updated_add_activity()
  bp_groups_delete_group_delete_all_activity()
  bp_groups_leave_group_delete_recent_activity()

Functions
Functions that are not part of a class:

groups_register_activity_actions()   X-Ref
Register activity actions for the Groups component.

since: 1.1.0
return: false|null False on failure.

bp_groups_get_activity_group( $group_id = 0 )   X-Ref
Get the group object the activity belongs to.

since: 5.0.0
return: BP_Groups_Group  The group object the activity belongs to.
param: integer $group_id The group ID the activity is linked to.

bp_groups_format_activity_action_created_group( $action, $activity )   X-Ref
Format 'created_group' activity actions.

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

bp_groups_format_activity_action_joined_group( $action, $activity )   X-Ref
Format 'joined_group' activity actions.

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

bp_groups_format_activity_action_group_details_updated( $action, $activity )   X-Ref
Format 'group_details_updated' activity actions.

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

bp_groups_format_activity_action_group_activity_update( $action, $activity )   X-Ref
Format the action for activity updates posted in a Group.

since: 5.0.0
return: string          The formatted action for activity updates posted in a Group.
param: string $action   Static activity action.
param: object $activity Activity data object.

bp_groups_prefetch_activity_object_data( $activities )   X-Ref
Fetch data related to groups 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_groups_filter_activity_scope( $retval = array()   X-Ref
Set up activity arguments for use with the 'groups' scope.

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

bp_groups_filter_activity_favorites_scope( $retval, $filter )   X-Ref
Enforces group membership restrictions on activity favorite queries.

since: 4.3.0
return: array
param: array $retval Query arguments.
param: array $filter

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

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

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

groups_post_update( $args = '' )   X-Ref
Post an Activity status update affiliated with a group.

since: 1.2.0
since: 2.6.0 Added 'error_type' parameter to $args.
return: WP_Error|bool|int Returns the ID of the new activity item on success, or false on failure.
param: array|string $args {

bp_groups_filter_activity_can_comment( $retval, $activity = null )   X-Ref
Function used to determine if a user can comment on a group activity item.

Used as a filter callback to 'bp_activity_can_comment'.

since: 3.0.0
return: bool
param: bool                      $retval   True if item can receive comments.
param: null|BP_Activity_Activity $activity Null by default. Pass an activity object to check against that instead.

bp_groups_filter_activity_can_comment_reply( $retval, $comment )   X-Ref
Function used to determine if a user can reply on a group activity comment.

Used as a filter callback to 'bp_activity_can_comment_reply'.

since: 3.0.0
return: bool
param: bool        $retval  True if activity comment can be replied to.
param: object|bool $comment Current activity comment object. If empty, parameter is boolean false.

bp_groups_membership_accepted_add_activity( $user_id, $group_id )   X-Ref
Add an activity stream item when a member joins a group.

since: 1.9.0
return: false|null False on failure.
param: int $user_id  ID of the user joining the group.
param: int $group_id ID of the group.

bp_groups_group_details_updated_add_activity( $group_id, $old_group, $notify_members )   X-Ref
Add an activity item when a group's details are updated.

since: 2.2.0
return: null|WP_Error|bool|int The ID of the activity on success. False on error.
param: int             $group_id       ID of the group.
param: BP_Groups_Group $old_group      Group object before the details had been changed.
param: bool            $notify_members True if the admin has opted to notify group members, otherwise false.

bp_groups_delete_group_delete_all_activity( $group_id )   X-Ref
Delete all activity items related to a specific group.

since: 1.9.0
param: int $group_id ID of the group.

bp_groups_leave_group_delete_recent_activity( $group_id, $user_id )   X-Ref
Delete group member activity if they leave or are removed within 5 minutes of membership modification.

If the user joined this group less than five minutes ago, remove the
joined_group activity so users cannot flood the activity stream by
joining/leaving the group in quick succession.

since: 1.9.0
param: int $group_id ID of the group.
param: int $user_id  ID of the user leaving the group.



Generated: Thu Sep 19 01:01:39 2019 Cross-referenced by PHPXref 0.7.1