[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress Activity Notifications.

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

Defines 10 functions

  bp_activity_format_notifications()
  bp_activity_at_mention_add_notification()
  bp_activity_update_reply_add_notification()
  bp_activity_comment_reply_add_notification()
  bp_activity_remove_screen_notifications()
  bp_activity_remove_screen_notifications_single_activity_permalink()
  bp_activity_remove_screen_notifications_for_non_mentions()
  bp_activity_at_mention_delete_notification()
  bp_activity_add_notification_for_synced_blog_comment()
  bp_activity_screen_notification_settings()

Functions
Functions that are not part of a class:

bp_activity_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string', $id = 0 )   X-Ref
Format notifications related to activity.

param: string $action            The type of activity item. Just 'new_at_mention' for now.
param: int    $item_id           The activity ID.
param: int    $secondary_item_id In the case of at-mentions, this is the mentioner's ID.
param: int    $total_items       The total number of notifications to format.
param: string $format            'string' for notification HTML link or 'array' for separate link and text.
param: int    $id                Optional. The notification ID.
since: 1.5.0
return: string $return Formatted @mention notification.

bp_activity_at_mention_add_notification( $activity, $subject, $message, $content, $receiver_user_id )   X-Ref
Notify a member when their nicename is mentioned in an activity stream item.

Hooked to the 'bp_activity_sent_mention_email' action, we piggy back off the
existing email code for now, since it does the heavy lifting for us. In the
future when we separate emails from Notifications, this will need its own
'bp_activity_at_name_send_emails' equivalent helper function.

param: object $activity           Activity object.
param: string $subject (not used) Notification subject.
param: string $message (not used) Notification message.
param: string $content (not used) Notification content.
param: int    $receiver_user_id   ID of user receiving notification.
since: 1.9.0

bp_activity_update_reply_add_notification( $activity, $comment_id, $commenter_id )   X-Ref
Notify a member one of their activity received a reply.

param: BP_Activity_Activity $activity     The original activity.
param: int                  $comment_id   ID for the newly received comment.
param: int                  $commenter_id ID of the user who made the comment.
since: 2.6.0

bp_activity_comment_reply_add_notification( $activity_comment, $comment_id, $commenter_id )   X-Ref
Notify a member one of their activity comment received a reply.

param: BP_Activity_Activity $activity_comment The parent activity.
param: int                  $comment_id       ID for the newly received comment.
param: int                  $commenter_id     ID of the user who made the comment.
since: 2.6.0

bp_activity_remove_screen_notifications( $user_id = 0 )   X-Ref
Mark at-mention notifications as read when users visit their Mentions page.

param: int $user_id The id of the user whose notifications are marked as read.
since: 1.5.0
since: 2.5.0 Add the $user_id parameter

bp_activity_remove_screen_notifications_single_activity_permalink( $activity )   X-Ref
Mark notifications as read when a user visits an activity permalink.

param: BP_Activity_Activity $activity Activity object.
since: 2.0.0
since: 3.2.0 Marks replies to parent update and replies to an activity comment as read.

bp_activity_remove_screen_notifications_for_non_mentions()   X-Ref
Mark non-mention notifications as read when user visits our read permalink.

In particular, 'update_reply' and 'comment_reply' notifications are handled
here. See {@link bp_activity_format_notifications()} for more info.

since: 2.6.0

bp_activity_at_mention_delete_notification( $activity_ids_deleted = array()   X-Ref
Delete at-mention notifications when the corresponding activity item is deleted.

param: array $activity_ids_deleted IDs of deleted activity items.
since: 2.0.0

bp_activity_add_notification_for_synced_blog_comment( $activity_id, $post_type_comment, $activity_args, $activity_post_object )   X-Ref
Add a notification for post comments to the post author or post commenter.

Requires "activity stream commenting on posts and comments" to be enabled.

param: int        $activity_id          The activity comment ID.
param: WP_Comment $post_type_comment    WP Comment object.
param: array      $activity_args        Activity comment arguments.
param: object     $activity_post_object The post type tracking args object.
since: 2.6.0

bp_activity_screen_notification_settings()   X-Ref
Add activity notifications settings to the notifications settings page.

since: 1.2.0



Generated: Fri Apr 19 01:01:08 2024 Cross-referenced by PHPXref 0.7.1