<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [3362] trunk:
Adds do_action hooks after notification emails are sent throughout BuddyPress
.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>3362</dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2010-11-06 14:32:52 +0000 (Sat, 06 Nov 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Adds do_action hooks after notification emails are sent throughout BuddyPress. Fixes #2397. Props r-a-y and jessica120 for prodding</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitynotificationsphp">trunk/bp-activity/bp-activity-notifications.php</a></li>
<li><a href="#trunkbpcorebpcorefiltersphp">trunk/bp-core/bp-core-filters.php</a></li>
<li><a href="#trunkbpcorebpcoresignupphp">trunk/bp-core/bp-core-signup.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsnotificationsphp">trunk/bp-friends/bp-friends-notifications.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsnotificationsphp">trunk/bp-groups/bp-groups-notifications.php</a></li>
<li><a href="#trunkbpmessagesbpmessagesnotificationsphp">trunk/bp-messages/bp-messages-notifications.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitynotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-notifications.php (3361 => 3362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-notifications.php        2010-11-06 13:13:32 UTC (rev 3361)
+++ trunk/bp-activity/bp-activity-notifications.php        2010-11-06 14:32:52 UTC (rev 3362)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx">                         wp_mail( $to, $subject, $message );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><ins>+        
+        do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'bp_activity_posted_update', 'bp_activity_at_message_notification', 10, 3 );
</span><span class="cx">
</span><span class="lines">@@ -93,6 +95,8 @@
</span><span class="cx">                 $message = apply_filters( 'bp_activity_new_comment_notification_message', $message, $poster_name, $content, $thread_link );
</span><span class="cx">
</span><span class="cx">                 wp_mail( $to, $subject, $message );
</span><ins>+                
+                do_action( 'bp_activity_sent_reply_to_update_email', $original_activity->user_id, $subject, $message, $comment_id, $commenter_id, $params );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /***
</span><span class="lines">@@ -136,6 +140,8 @@
</span><span class="cx">                 $message = apply_filters( 'bp_activity_new_comment_notification_comment_author_message', $message, $poster_name, $content );
</span><span class="cx">
</span><span class="cx">                 wp_mail( $to, $subject, $message );
</span><ins>+                
+                do_action( 'bp_activity_sent_reply_to_reply_email', $original_activity->user_id, $subject, $message, $comment_id, $commenter_id, $params );
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcorefiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-filters.php (3361 => 3362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-filters.php        2010-11-06 13:13:32 UTC (rev 3361)
+++ trunk/bp-core/bp-core-filters.php        2010-11-06 14:32:52 UTC (rev 3362)
</span><span class="lines">@@ -205,6 +205,8 @@
</span><span class="cx">         $message = apply_filters( 'bp_core_activation_signup_blog_notification_message', $message );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message, $message_headers );
</span><ins>+        
+        do_action( 'bp_core_sent_blog_signup_email', $admin_email, $subject, $message, $domain, $path, $title, $user, $user_email, $key, $meta );
</ins><span class="cx">
</span><span class="cx">         // Return false to stop the original WPMU function from continuing
</span><span class="cx">         return false;
</span><span class="lines">@@ -238,6 +240,8 @@
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message, $message_headers );
</span><span class="cx">
</span><ins>+        do_action( 'bp_core_sent_user_signup_email', $admin_email, $subject, $message, $user, $user_email, $key, $meta );
+
</ins><span class="cx">         // Return false to stop the original WPMU function from continuing
</span><span class="cx">         return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpcorebpcoresignupphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-signup.php (3361 => 3362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-signup.php        2010-11-06 13:13:32 UTC (rev 3361)
+++ trunk/bp-core/bp-core-signup.php        2010-11-06 14:32:52 UTC (rev 3362)
</span><span class="lines">@@ -591,6 +591,8 @@
</span><span class="cx">         $message = apply_filters( 'bp_core_activation_signup_user_notification_message', $message );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message, $message_headers );
</span><ins>+        
+        do_action( 'bp_core_sent_user_validation_email', $admin_email, $subject, $message, $user_id, $user_email, $key );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* Stop user accounts logging in that have not been activated (user_status = 2) */
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-notifications.php (3361 => 3362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-notifications.php        2010-11-06 13:13:32 UTC (rev 3361)
+++ trunk/bp-friends/bp-friends-notifications.php        2010-11-06 14:32:52 UTC (rev 3362)
</span><span class="lines">@@ -39,6 +39,8 @@
</span><span class="cx">         $message = apply_filters( 'friends_notification_new_request_message', $message, $initiator_name, $initiator_link, $all_requests_link );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><ins>+        
+        do_action( 'bp_friends_sent_request_email', $friend_id, $subject, $message, $friendship_id, $initiator_id );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function friends_notification_accepted_request( $friendship_id, $initiator_id, $friend_id ) {
</span><span class="lines">@@ -77,6 +79,8 @@
</span><span class="cx">         $message = apply_filters( 'friends_notification_accepted_request_message', $message, $friend_name, $friend_link );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><ins>+        
+        do_action( 'bp_friends_sent_accepted_email', $initator_id, $subject, $message, $friendship_id, $friend_id );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-notifications.php (3361 => 3362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-notifications.php        2010-11-06 13:13:32 UTC (rev 3361)
+++ trunk/bp-groups/bp-groups-notifications.php        2010-11-06 14:32:52 UTC (rev 3362)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx">
</span><span class="cx">                 unset( $message, $to );
</span><span class="cx">         }
</span><ins>+        
+        do_action( 'bp_groups_sent_updated_email', $user_ids, $subject, $message, $group_id );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function groups_notification_new_membership_request( $requesting_user_id, $admin_id, $group_id, $membership_id ) {
</span><span class="lines">@@ -84,6 +86,8 @@
</span><span class="cx">         $message = apply_filters( 'groups_notification_new_membership_request_message', $message, &$group, $requesting_user_name, $profile_link, $group_requests );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><ins>+        
+        do_action( 'bp_groups_sent_membership_request_email', $admin_id, $subject, $message, $requesting_user_id, $group_id, $membership_id );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function groups_notification_membership_request_completed( $requesting_user_id, $group_id, $accepted = true ) {
</span><span class="lines">@@ -138,6 +142,8 @@
</span><span class="cx">         $message = apply_filters( 'groups_notification_membership_request_completed_message', $message, &$group, $group_link );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><ins>+        
+        do_action( 'bp_groups_sent_membership_approved_email', $requesting_user_id, $subject, $message, $group_id );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function groups_notification_promoted_member( $user_id, $group_id ) {
</span><span class="lines">@@ -184,6 +190,8 @@
</span><span class="cx">         $message = apply_filters( 'groups_notification_promoted_member_message', $message, &$group, $promoted_to, $group_link );
</span><span class="cx">
</span><span class="cx">         wp_mail( $to, $subject, $message );
</span><ins>+        
+        do_action( 'bp_groups_sent_promoted_email', $user_id, $subject, $message, $group_id );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );
</span><span class="cx">
</span><span class="lines">@@ -237,6 +245,8 @@
</span><span class="cx">
</span><span class="cx">                 wp_mail( $to, $subject, $message );
</span><span class="cx">         }
</span><ins>+        
+        do_action( 'bp_groups_sent_invited_email', $invited_user_id, $subject, $message, $group );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function groups_at_message_notification( $content, $poster_user_id, $group_id, $activity_id ) {
</span><span class="lines">@@ -296,6 +306,8 @@
</span><span class="cx">                         wp_mail( $to, $subject, $message );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><ins>+        
+        do_action( 'bp_groups_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $group_id, $activity_id );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'bp_groups_posted_update', 'groups_at_message_notification', 10, 4 );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagesnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-notifications.php (3361 => 3362)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-notifications.php        2010-11-06 13:13:32 UTC (rev 3361)
+++ trunk/bp-messages/bp-messages-notifications.php        2010-11-06 14:32:52 UTC (rev 3362)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx">
</span><span class="cx">                 wp_mail( $email_to, $email_subject, $email_content );
</span><span class="cx">         }
</span><ins>+        
+        do_action( 'bp_messages_sent_notification_email', $recipients, $email_subject, $email_content, $args );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>