<!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" />
<title>[BuddyPress][4738] trunk: Fixes at-mentions so that they are turned into links in contexts other than activity updates.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/4738">4738</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2011-07-20 23:29:25 +0000 (Wed, 20 Jul 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes at-mentions so that they are turned into links in contexts other than activity updates. Fixes <a href="http://buddypress.trac.wordpress.org/ticket/3363">#3363</a>. Deprecates groups_at_mention_notification() in favor of bp_activity_at_message_notification(). Reconfigures at-mention notification so that BP notifications and email notifications are receieved for a wider variety of activity item types.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityfiltersphp">trunk/bp-activity/bp-activity-filters.php</a></li>
<li><a href="#trunkbpactivitybpactivitynotificationsphp">trunk/bp-activity/bp-activity-notifications.php</a></li>
<li><a href="#trunkbpcoredeprecated13php">trunk/bp-core/deprecated/1.3.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsnotificationsphp">trunk/bp-groups/bp-groups-notifications.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-filters.php (4737 => 4738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-filters.php        2011-07-20 20:30:57 UTC (rev 4737)
+++ trunk/bp-activity/bp-activity-filters.php        2011-07-20 23:29:25 UTC (rev 4738)
</span><span class="lines">@@ -71,8 +71,12 @@
</span><span class="cx"> add_filter( 'bp_get_activity_latest_update_excerpt', 'bp_activity_make_nofollow_filter' );
</span><span class="cx"> add_filter( 'bp_get_activity_feed_item_description', 'bp_activity_make_nofollow_filter' );
</span><span class="cx"> 
</span><del>-add_filter( 'bp_get_activity_parent_content', 'bp_create_excerpt' );
</del><ins>+add_filter( 'pre_comment_content',                   'bp_activity_at_name_filter' ); 
+add_filter( 'group_forum_topic_text_before_save',    'bp_activity_at_name_filter' ); 
+add_filter( 'group_forum_post_text_before_save',     'bp_activity_at_name_filter' ); 
</ins><span class="cx"> 
</span><ins>+add_filter( 'bp_get_activity_parent_content',        'bp_create_excerpt' );
+
</ins><span class="cx"> function bp_activity_filter_kses( $content ) {
</span><span class="cx">         global $allowedtags;
</span><span class="cx"> 
</span><span class="lines">@@ -101,20 +105,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * bp_activity_at_name_filter()
</del><ins>+ * Finds and links @-mentioned users in the contents of activity items
</ins><span class="cx">  *
</span><del>- * Finds and links @-mentioned users in activity updates
- *
</del><span class="cx">  * @package BuddyPress Activity
</span><span class="cx">  *
</span><span class="cx">  * @param string $content The activity content
</span><ins>+ * @param int $activity_id When $adjust_mention_count is true, you must provide an $activity_id, 
+ *   which will be added to the list of the user's unread mentions
</ins><span class="cx">  */
</span><del>-function bp_activity_at_name_filter( $activity ) {
-        // Only run this function once for a given activity item
-        remove_filter( 'bp_activity_after_save', 'bp_activity_at_name_filter' );
-
-        $content = $activity-&gt;content;
-
</del><ins>+function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
</ins><span class="cx">         $usernames = bp_activity_find_mentions( $content );
</span><span class="cx"> 
</span><span class="cx">         foreach( (array)$usernames as $username ) {
</span><span class="lines">@@ -126,17 +125,40 @@
</span><span class="cx">                 if ( empty( $user_id ) )
</span><span class="cx">                         continue;
</span><span class="cx"> 
</span><del>-                // Increase the number of new @ mentions for the user
-                bp_activity_adjust_mention_count( $activity-&gt;id, 'add' );
</del><ins>+                // If an activity_id is provided, we can send email and BP notifications
+                if ( $activity_id ) {
+                        bp_activity_at_message_notification( $activity_id, $user_id );
+                }
</ins><span class="cx"> 
</span><span class="cx">                 $content = preg_replace( '/(@' . $username . '\b)/', &quot;&lt;a href='&quot; . bp_core_get_user_domain( $user_id ) . &quot;' rel='nofollow'&gt;@$username&lt;/a&gt;&quot;, $content );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        // Resave the activity item with the linked usernames
-        $activity-&gt;content = $content;
</del><ins>+        // Adjust the activity count for this item        
+        if ( $activity_id )
+                bp_activity_adjust_mention_count( $activity_id, 'add' );
+
+        return $content;
+} 
+
+/**
+ * Catch mentions in saved activity items
+ *
+ * @package BuddyPress
+ * @since 1.3
+ *
+ * @param obj $activity
+ */
+function bp_activity_at_name_filter_updates( $activity ) {
+        // Only run this function once for a given activity item
+        remove_filter( 'bp_activity_after_save', 'bp_activity_at_name_filter_updates' );
+        
+        // Run the content through the linking filter, making sure to increment mention count
+        $activity-&gt;content = bp_activity_at_name_filter( $activity-&gt;content, $activity-&gt;id );
+        
+        // Resave the activity with the new content
</ins><span class="cx">         $activity-&gt;save();
</span><span class="cx"> }
</span><del>-add_filter( 'bp_activity_after_save', 'bp_activity_at_name_filter' );
</del><ins>+add_filter( 'bp_activity_after_save', 'bp_activity_at_name_filter_updates' );
</ins><span class="cx"> 
</span><span class="cx"> function bp_activity_make_nofollow_filter( $text ) {
</span><span class="cx">         return preg_replace_callback( '|&lt;a (.+?)&gt;|i', 'bp_activity_make_nofollow_filter_callback', $text );
</span></span></pre></div>
<a id="trunkbpactivitybpactivitynotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-notifications.php (4737 => 4738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-notifications.php        2011-07-20 20:30:57 UTC (rev 4737)
+++ trunk/bp-activity/bp-activity-notifications.php        2011-07-20 23:29:25 UTC (rev 4738)
</span><span class="lines">@@ -8,48 +8,45 @@
</span><span class="cx">  * @param int $poster_user_id The unique user_id of the user who sent the update
</span><span class="cx">  * @param int $activity_id The id of the activity update
</span><span class="cx">  */
</span><del>-function bp_activity_at_message_notification( $content, $poster_user_id, $activity_id ) {
</del><ins>+function bp_activity_at_message_notification( $activity_id, $receiver_user_id ) {
</ins><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        /* Scan for @username strings in an activity update. Notify each user. */
-        $pattern = '/[@]+([A-Za-z0-9-_\.@]+)/';
-        preg_match_all( $pattern, $content, $usernames );
</del><ins>+        $activity = new BP_Activity_Activity( $activity_id );
</ins><span class="cx"> 
</span><del>-        /* Make sure there's only one instance of each username */
-        if ( !$usernames = array_unique( $usernames[1] ) )
-                return false;
</del><ins>+        $subject = '';
+        $message = '';
+        
+        // Add the BP notification
+        bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $activity-&gt;user_id );
+                        
+        // Now email the user with the contents of the message (if they have enabled email notifications)
+        if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
+                $poster_name = bp_core_get_user_displayname( $activity-&gt;user_id );
</ins><span class="cx"> 
</span><del>-        foreach( (array)$usernames as $username ) {
-                if ( bp_is_username_compatibility_mode() )
-                        $receiver_user_id = bp_core_get_userid( $username );
-                else
-                        $receiver_user_id = bp_core_get_userid_from_nicename( $username );
</del><ins>+                $message_link = bp_activity_get_permalink( $activity_id );
+                $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
</ins><span class="cx"> 
</span><del>-                if ( empty( $receiver_user_id ) )
-                        continue;
</del><ins>+                $poster_name = stripslashes( $poster_name );
+                $content = bp_activity_filter_kses( strip_tags( stripslashes( $activity-&gt;content ) ) );
</ins><span class="cx"> 
</span><del>-                bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $poster_user_id );
</del><ins>+                // Set up and send the message
+                $ud       = bp_core_get_core_userdata( $receiver_user_id );
+                $to       = $ud-&gt;user_email;
+                $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
+                $subject  = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
</ins><span class="cx"> 
</span><del>-                $subject = '';
-                $message = '';
</del><ins>+                if ( bp_is_active( 'groups' ) &amp;&amp; bp_is_group() ) {
+                        $message = sprintf( __(
+'%1$s mentioned you in the group &quot;%2$s&quot;:
</ins><span class="cx"> 
</span><del>-                // Now email the user with the contents of the message (if they have enabled email notifications)
-                if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
-                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
</del><ins>+&quot;%3$s&quot;
</ins><span class="cx"> 
</span><del>-                        $message_link = bp_activity_get_permalink( $activity_id );
-                        $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
</del><ins>+To view and respond to the message, log in and visit: %4$s
</ins><span class="cx"> 
</span><del>-                        $poster_name = stripslashes( $poster_name );
-                        $content = bp_activity_filter_kses( stripslashes($content) );
-
-                        // Set up and send the message
-                        $ud       = bp_core_get_core_userdata( $receiver_user_id );
-                        $to       = $ud-&gt;user_email;
-                        $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
-                        $subject  = '[' . $sitename . '] ' . sprintf( __( '%s mentioned you in an update', 'buddypress' ), $poster_name );
-
-$message = sprintf( __(
</del><ins>+---------------------
+', 'buddypress' ), $poster_name, bp_get_current_group_name(), $content, $message_link );
+                } else {
+                        $message = sprintf( __(
</ins><span class="cx"> '%1$s mentioned you in an update:
</span><span class="cx"> 
</span><span class="cx"> &quot;%2$s&quot;
</span><span class="lines">@@ -58,21 +55,20 @@
</span><span class="cx"> 
</span><span class="cx"> ---------------------
</span><span class="cx"> ', 'buddypress' ), $poster_name, $content, $message_link );
</span><ins>+                }
</ins><span class="cx"> 
</span><del>-                        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</del><ins>+                $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</ins><span class="cx"> 
</span><del>-                        /* Send the message */
-                        $to = apply_filters( 'bp_activity_at_message_notification_to', $to );
-                        $subject = apply_filters( 'bp_activity_at_message_notification_subject', $subject, $poster_name );
-                        $message = apply_filters( 'bp_activity_at_message_notification_message', $message, $poster_name, $content, $message_link, $settings_link );
</del><ins>+                /* Send the message */
+                $to          = apply_filters( 'bp_activity_at_message_notification_to', $to );
+                $subject = apply_filters( 'bp_activity_at_message_notification_subject', $subject, $poster_name );
+                $message = apply_filters( 'bp_activity_at_message_notification_message', $message, $poster_name, $content, $message_link, $settings_link );
</ins><span class="cx"> 
</span><del>-                        wp_mail( $to, $subject, $message );
-                }
-                
-                do_action( 'bp_activity_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $activity_id );
</del><ins>+                wp_mail( $to, $subject, $message );
</ins><span class="cx">         }
</span><ins>+        
+        do_action( 'bp_activity_sent_mention_email', $activity, $subject, $message, $content );
</ins><span class="cx"> }
</span><del>-add_action( 'bp_activity_posted_update', 'bp_activity_at_message_notification', 10, 3 );
</del><span class="cx"> 
</span><span class="cx"> function bp_activity_new_comment_notification( $comment_id, $commenter_id, $params ) {
</span><span class="cx">         global $bp;
</span></span></pre></div>
<a id="trunkbpcoredeprecated13php"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/deprecated/1.3.php (4737 => 4738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/deprecated/1.3.php        2011-07-20 20:30:57 UTC (rev 4737)
+++ trunk/bp-core/deprecated/1.3.php        2011-07-20 23:29:25 UTC (rev 4738)
</span><span class="lines">@@ -249,7 +249,75 @@
</span><span class="cx">         echo apply_filters( 'bp_logout_link', $logout_link );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/**
+ * Send an email and a BP notification on receipt of an @-mention in a group
+ *
+ * @deprecated 1.3
+ * @deprecated Deprecated in favor of the more general bp_activity_at_message_notification()
+ */
+function groups_at_message_notification( $content, $poster_user_id, $group_id, $activity_id ) {
+        global $bp;
+        
+        _deprecated_function( __FUNCTION__, '1.3', 'bp_activity_at_message_notification()' );
</ins><span class="cx"> 
</span><ins>+        /* Scan for @username strings in an activity update. Notify each user. */
+        $pattern = '/[@]+([A-Za-z0-9-_\.@]+)/';
+        preg_match_all( $pattern, $content, $usernames );
+
+        /* Make sure there's only one instance of each username */
+        if ( !$usernames = array_unique( $usernames[1] ) )
+                return false;
+
+        $group = new BP_Groups_Group( $group_id );
+
+        foreach( (array)$usernames as $username ) {
+                if ( !$receiver_user_id = bp_core_get_userid( $username ) )
+                        continue;
+
+                /* Check the user is a member of the group before sending the update. */
+                if ( !groups_is_user_member( $receiver_user_id, $group_id ) )
+                        continue;
+
+                // Now email the user with the contents of the message (if they have enabled email notifications)
+                if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
+                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
+
+                        $message_link = bp_activity_get_permalink( $activity_id );
+                        $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
+
+                        $poster_name = stripslashes( $poster_name );
+                        $content = bp_groups_filter_kses( stripslashes( $content ) );
+
+                        // Set up and send the message
+                        $ud = bp_core_get_core_userdata( $receiver_user_id );
+                        $to = $ud-&gt;user_email;
+                        $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
+                        $subject  = '[' . $sitename . '] ' . sprintf( __( '%1$s mentioned you in the group &quot;%2$s&quot;', 'buddypress' ), $poster_name, $group-&gt;name );
+
+$message = sprintf( __(
+'%1$s mentioned you in the group &quot;%2$s&quot;:
+
+&quot;%3$s&quot;
+
+To view and respond to the message, log in and visit: %4$s
+
+---------------------
+', 'buddypress' ), $poster_name, $group-&gt;name, $content, $message_link );
+
+                        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
+
+                        /* Send the message */
+                        $to = apply_filters( 'groups_at_message_notification_to', $to );
+                        $subject = apply_filters( 'groups_at_message_notification_subject', $subject, $group, $poster_name );
+                        $message = apply_filters( 'groups_at_message_notification_message', $message, $group, $poster_name, $content, $message_link, $settings_link );
+
+                        wp_mail( $to, $subject, $message );
+                }
+        }
+
+        do_action( 'bp_groups_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $group_id, $activity_id );
+}
+
</ins><span class="cx"> /** Theme *********************************************************************/
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-notifications.php (4737 => 4738)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-notifications.php        2011-07-20 20:30:57 UTC (rev 4737)
+++ trunk/bp-groups/bp-groups-notifications.php        2011-07-20 23:29:25 UTC (rev 4738)
</span><span class="lines">@@ -249,67 +249,4 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function groups_at_message_notification( $content, $poster_user_id, $group_id, $activity_id ) {
-        global $bp;
-
-        /* Scan for @username strings in an activity update. Notify each user. */
-        $pattern = '/[@]+([A-Za-z0-9-_\.@]+)/';
-        preg_match_all( $pattern, $content, $usernames );
-
-        /* Make sure there's only one instance of each username */
-        if ( !$usernames = array_unique( $usernames[1] ) )
-                return false;
-
-        $group = new BP_Groups_Group( $group_id );
-
-        foreach( (array)$usernames as $username ) {
-                if ( !$receiver_user_id = bp_core_get_userid( $username ) )
-                        continue;
-
-                /* Check the user is a member of the group before sending the update. */
-                if ( !groups_is_user_member( $receiver_user_id, $group_id ) )
-                        continue;
-
-                // Now email the user with the contents of the message (if they have enabled email notifications)
-                if ( 'no' != bp_get_user_meta( $user_id, 'notification_activity_new_mention', true ) ) {
-                        $poster_name = bp_core_get_user_displayname( $poster_user_id );
-
-                        $message_link = bp_activity_get_permalink( $activity_id );
-                        $settings_link = bp_core_get_user_domain( $receiver_user_id ) . bp_get_settings_slug() . '/notifications/';
-
-                        $poster_name = stripslashes( $poster_name );
-                        $content = bp_groups_filter_kses( stripslashes( $content ) );
-
-                        // Set up and send the message
-                        $ud = bp_core_get_core_userdata( $receiver_user_id );
-                        $to = $ud-&gt;user_email;
-                        $sitename = wp_specialchars_decode( get_blog_option( bp_get_root_blog_id(), 'blogname' ), ENT_QUOTES );
-                        $subject  = '[' . $sitename . '] ' . sprintf( __( '%1$s mentioned you in the group &quot;%2$s&quot;', 'buddypress' ), $poster_name, $group-&gt;name );
-
-$message = sprintf( __(
-'%1$s mentioned you in the group &quot;%2$s&quot;:
-
-&quot;%3$s&quot;
-
-To view and respond to the message, log in and visit: %4$s
-
----------------------
-', 'buddypress' ), $poster_name, $group-&gt;name, $content, $message_link );
-
-                        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
-
-                        /* Send the message */
-                        $to = apply_filters( 'groups_at_message_notification_to', $to );
-                        $subject = apply_filters( 'groups_at_message_notification_subject', $subject, $group, $poster_name );
-                        $message = apply_filters( 'groups_at_message_notification_message', $message, $group, $poster_name, $content, $message_link, $settings_link );
-
-                        wp_mail( $to, $subject, $message );
-                }
-        }
-
-        do_action( 'bp_groups_sent_mention_email', $usernames, $subject, $message, $content, $poster_user_id, $group_id, $activity_id );
-}
-add_action( 'bp_groups_posted_update', 'groups_at_message_notification', 10, 4 );
-
-
</del><span class="cx"> ?&gt;
</span></span></pre>
</div>
</div>

</body>
</html>