Changeset 3665 for trunk/bp-activity/bp-activity-notifications.php
- Timestamp:
- 01/06/2011 02:57:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-notifications.php
r3592 r3665 1 1 <?php 2 2 3 /** 4 * Sends an email notification and a BP notification when someone mentions you in an update 5 * 6 * @package BuddyPress Activity 7 * @param str $content The content of the activity update 8 * @param int $poster_user_id The unique user_id of the user who sent the update 9 * @param int $activity_id The id of the activity update 10 */ 3 11 function bp_activity_at_message_notification( $content, $poster_user_id, $activity_id ) { 4 12 global $bp; … … 17 25 18 26 bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id ); 27 28 $subject = ''; 29 $message = ''; 19 30 20 31 // Now email the user with the contents of the message (if they have enabled email notifications) … … 53 64 wp_mail( $to, $subject, $message ); 54 65 } 66 67 do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id ); 55 68 } 56 57 do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id );58 69 } 59 70 add_action( 'bp_activity_posted_update', 'bp_activity_at_message_notification', 10, 3 );
Note: See TracChangeset
for help on using the changeset viewer.