<!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] [1691] trunk: Added support for deleting activity stream items
 .</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>1691</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-08-25 00:44:29 +0000 (Tue, 25 Aug 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Added support for deleting activity stream items.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityclassesphp">trunk/bp-activity/bp-activity-classes.php</a></li>
<li><a href="#trunkbpactivitybpactivityfiltersphp">trunk/bp-activity/bp-activity-filters.php</a></li>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpthemesbpdefault_inccssscreencss">trunk/bp-themes/bp-default/_inc/css/screen.css</a></li>
<li><a href="#trunkbpthemesbpsnframeworkactivitymyfriendsphp">trunk/bp-themes/bp-sn-framework/activity/my-friends.php</a></li>
<li><a href="#trunkbpwirebpwiretemplatetagsphp">trunk/bp-wire/bp-wire-templatetags.php</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkbpforumsbpforumscssjsphp">trunk/bp-forums/bp-forums-cssjs.php</a></li>
<li>trunk/bp-themes/bp-sn-framework/_inc/js/custom/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-classes.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-classes.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-activity/bp-activity-classes.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -11,20 +11,12 @@
</span><span class="cx">         var $date_recorded;
</span><span class="cx">         var $hide_sitewide = false;
</span><span class="cx">         
</span><del>-        function bp_activity_activity( $args = false, $populate = false ) {
</del><ins>+        function bp_activity_activity( $id = false ) {
</ins><span class="cx">                 global $bp;
</span><span class="cx">                 
</span><del>-                if ( $args &amp;&amp; is_array($args) ) {
-                        extract( $args );
-                        
-                        $this-&gt;user_id = $user_id;
-                        $this-&gt;component_name = $component_name;
-                        $this-&gt;component_action = $component_action;
-                        $this-&gt;item_id = $item_id;
-                        $this-&gt;secondary_item_id = $secondary_item_id;
-                        
-                        if ( $populate )
-                                $this-&gt;populate();
</del><ins>+                if ( $id ) {
+                        $this-&gt;id = $id;
+                        $this-&gt;populate();
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -170,6 +162,7 @@
</span><span class="cx">                 $total_activities = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT count(id) FROM {$bp-&gt;activity-&gt;table_name} WHERE user_id = %d AND date_recorded &gt;= FROM_UNIXTIME(%d) $privacy_sql $filter_sql ORDER BY date_recorded DESC $max_sql&quot;, $user_id, $since ) );
</span><span class="cx"> 
</span><span class="cx">                 for ( $i = 0; $i &lt; count( $activities ); $i++ ) {
</span><ins>+                        $activities_formatted[$i]['id'] = $activities[$i]-&gt;id;
</ins><span class="cx">                         $activities_formatted[$i]['user_id'] = $activities[$i]-&gt;user_id;
</span><span class="cx">                         $activities_formatted[$i]['content'] = $activities[$i]-&gt;content;
</span><span class="cx">                         $activities_formatted[$i]['primary_link'] = $activities[$i]-&gt;primary_link;
</span><span class="lines">@@ -237,6 +230,7 @@
</span><span class="cx">                 $total_activities = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT count(id) FROM {$bp-&gt;activity-&gt;table_name} WHERE hide_sitewide = 0 $filter_sql ORDER BY date_recorded DESC $max_sql&quot; ) );
</span><span class="cx"> 
</span><span class="cx">                 for ( $i = 0; $i &lt; count( $activities ); $i++ ) {
</span><ins>+                        $activities_formatted[$i]['id'] = $activities[$i]-&gt;id;
</ins><span class="cx">                         $activities_formatted[$i]['user_id'] = $activities[$i]-&gt;user_id;
</span><span class="cx">                         $activities_formatted[$i]['content'] = $activities[$i]-&gt;content;
</span><span class="cx">                         $activities_formatted[$i]['primary_link'] = $activities[$i]-&gt;primary_link;
</span></span></pre></div>
<a id="trunkbpactivitybpactivityfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-filters.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-filters.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-activity/bp-activity-filters.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -13,6 +13,8 @@
</span><span class="cx"> function bp_activity_add_allowed_tags( $allowedtags ) {
</span><span class="cx">         $allowedtags['span'] = array();
</span><span class="cx">         $allowedtags['span']['class'] = array();
</span><ins>+        $allowedtags['a']['class'] = array();
+        $allowedtags['img'] = array();
</ins><span class="cx">         return $allowedtags;
</span><span class="cx"> }
</span><span class="cx"> add_filter( 'edit_allowedtags', 'bp_activity_add_allowed_tags', 1 );
</span></span></pre></div>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-activity/bp-activity-templatetags.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -248,19 +248,19 @@
</span><span class="cx">         echo bp_get_activity_content();
</span><span class="cx"> }
</span><span class="cx">         function bp_get_activity_content() {
</span><del>-                global $activities_template, $allowed_tags;
</del><ins>+                global $activities_template, $allowed_tags, $bp;
</ins><span class="cx"> 
</span><del>-                if ( bp_is_home() &amp;&amp; $activities_template-&gt;activity_type == 'personal' ) {
</del><ins>+                if ( bp_is_home() &amp;&amp; $activities_template-&gt;activity_type == 'personal' )
</ins><span class="cx">                         $content = bp_activity_content_filter( $activities_template-&gt;activity-&gt;content, $activities_template-&gt;activity-&gt;date_recorded, $activities_template-&gt;full_name );                                                
</span><del>-                } else {
-                        $activities_template-&gt;activity-&gt;content = bp_activity_insert_time_since( $activities_template-&gt;activity-&gt;content, $activities_template-&gt;activity-&gt;date_recorded );
-                        $content = $activities_template-&gt;activity-&gt;content;
-                }
-                
</del><ins>+                else
+                        $content = bp_activity_content_filter( $activities_template-&gt;activity-&gt;content, $activities_template-&gt;activity-&gt;date_recorded, $activities_template-&gt;full_name, true, false, false );
+
</ins><span class="cx">                 return apply_filters( 'bp_get_activity_content', $content );
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> function bp_activity_content_filter( $content, $date_recorded, $full_name, $insert_time = true, $filter_words = true, $filter_you = true ) {
</span><ins>+        global $activities_template, $bp;
+        
</ins><span class="cx">         if ( !$content )
</span><span class="cx">                 return false;
</span><span class="cx">                 
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx">         /* Insert the time since */
</span><span class="cx">         if ( $insert_time )
</span><span class="cx">                 $content[0] = bp_activity_insert_time_since( $content[0], $date_recorded );
</span><del>-
</del><ins>+        
</ins><span class="cx">         // The &quot;You&quot; and &quot;Your&quot; conversion is only done in english, if a translation file is present
</span><span class="cx">         // then do not translate as it causes problems in other languages.
</span><span class="cx">         if ( '' == get_locale() ) {
</span><span class="lines">@@ -287,6 +287,10 @@
</span><span class="cx">                         $content[0] = preg_replace( &quot;/{$full_name}[&lt;]/&quot;, 'You&lt;', $content[0] );                                
</span><span class="cx">                 }
</span><span class="cx">         }
</span><ins>+
+        /* Add the delete link if the user has permission on this item */
+        if ( ( $activities_template-&gt;activity-&gt;user_id == $bp-&gt;loggedin_user-&gt;id ) || $bp-&gt;is_item_admin || is_site_admin() )
+                $content[1] = '&lt;/span&gt; &lt;span class=&quot;activity-delete-link&quot;&gt;' . bp_get_activity_delete_link() . '&lt;/span&gt;' . $content[1];        
</ins><span class="cx">         
</span><span class="cx">         $content_new = '';
</span><span class="cx">         
</span><span class="lines">@@ -315,6 +319,15 @@
</span><span class="cx">                 return apply_filters( 'bp_get_activity_css_class', $activities_template-&gt;activity-&gt;component_name );
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+function bp_activity_delete_link() {
+        echo bp_get_activity_delete_link();
+}
+        function bp_get_activity_delete_link() {
+                global $activities_template, $bp;
+
+                return apply_filters( 'bp_get_activity_delete_link', '&lt;a href=&quot;' . wp_nonce_url( $bp-&gt;root_domain . '/' . $bp-&gt;activity-&gt;slug . '/delete/' . $activities_template-&gt;activity-&gt;id, 'bp_activity_delete_link' ) . '&quot; class=&quot;item-button delete confirm&quot;&gt;' . __( 'Delete', 'buddypress' ) . '&lt;/a&gt;' );
+        }
+
</ins><span class="cx"> function bp_activity_filter_links( $args = false ) {
</span><span class="cx">         echo bp_get_activity_filter_links( $args );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-activity.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -120,6 +120,39 @@
</span><span class="cx">  * back to the default screen after execution.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function bp_activity_action_delete_activity() {
+        global $bp;
+
+        if ( $bp-&gt;current_component != $bp-&gt;activity-&gt;slug || $bp-&gt;current_action != 'delete' )
+                return false;
+
+        if ( empty( $bp-&gt;action_variables[0] ) || !is_numeric( $bp-&gt;action_variables[0] ) )
+                return false;
+
+        /* Check the nonce */
+        check_admin_referer( 'bp_activity_delete_link' );
+        
+        $activity_id = $bp-&gt;action_variables[0];
+        
+        /* Check access */
+        if ( !is_site_admin() ) {
+                $activity = new BP_Activity_Activity( $activity_id );
+                
+                if ( $activity-&gt;user_id != $bp-&gt;loggedin_user-&gt;id )
+                        return false;
+        }
+        
+        /* Now delete the activity item */
+        if ( bp_activity_delete_by_activity_id( $activity_id ) )
+                bp_core_add_message( __( 'Activity deleted', 'buddypress' ) );
+        else
+                bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
+        
+        bp_core_redirect( $_SERVER['HTTP_REFERER'] );
+}
+add_action( 'wp', 'bp_activity_action_delete_activity', 3 );
+
+
</ins><span class="cx"> function bp_activity_action_sitewide_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpforumsbpforumscssjsphp"></a>
<div class="delfile"><h4>Deleted: trunk/bp-forums/bp-forums-cssjs.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-cssjs.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-forums/bp-forums-cssjs.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -1,33 +0,0 @@
</span><del>-&lt;?php
-
-function bp_forums_add_js() {
-        global $bp;
-?&gt;
-        &lt;script type=&quot;text/javascript&quot;&gt;
-                jQuery(document).ready( function() {
-                        jQuery(&quot;a#topic-delete-link&quot;).click( function() {
-                                if ( confirm( '&lt;?php _e( 'Are you sure you want to delete this topic?', 'buddypress' ) ?&gt;' ) ) 
-                                        return true;
-                                else
-                                        return false;
-                        });
-                        
-                        jQuery(&quot;a#post-delete-link&quot;).click( function() {
-                                if ( confirm( '&lt;?php _e( 'Are you sure you want to delete this post?', 'buddypress' ) ?&gt;' ) ) 
-                                        return true;
-                                else
-                                        return false;
-                        });
-        
-                        jQuery(&quot;a#topic-close-link&quot;).click( function() {
-                                if ( confirm( '&lt;?php _e( 'Are you sure you want to close this topic?', 'buddypress' ) ?&gt;' ) ) 
-                                        return true;
-                                else
-                                        return false;
-                        });
-                });
-        &lt;/script&gt;
-&lt;?php
-}
-
-?&gt;
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_inccssscreencss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/screen.css (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/screen.css        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-themes/bp-default/_inc/css/screen.css        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -674,7 +674,39 @@
</span><span class="cx">                         float: right;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+a.item-button {
+        border: 1px solid #eee;
+        background: #f5f5f5;
+        color: #999;
+        padding: 0 3px;
+        -moz-border-radius: 3px;
+        -webkit-border-radius: 3px;
+        border-radius: 3px;
+        font-size: 0.8em;
+        text-decoration: none;
+}
+        a.item-button:hover {
+                border-color: #ccc;
+                color: #777;
+        }
</ins><span class="cx"> 
</span><ins>+        .activity-list li a.item-button {
+                display: none;
+                position: absolute;
+                right: 0 !important;
+                top: 0 !important;
+        }
+                .item-list li a.item-button {
+                        display: none;
+                        position: absolute;
+                        top: 10px;
+                        right: 10px;
+                }
+
+        .activity-list li:hover a.item-button, .item-list li:hover a.item-button {
+                display: inline;
+        }
+
</ins><span class="cx"> /*** Standard Form Styles ***************************************************/
</span><span class="cx"> 
</span><span class="cx"> form.standard-form { }
</span><span class="lines">@@ -1211,8 +1243,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .activity-list li {
</span><ins>+        position: relative;
</ins><span class="cx">         margin: 5px 15px;
</span><del>-        padding: 0 0 0 34px !important;
</del><ins>+        padding: 0 50px 0 34px !important;
</ins><span class="cx">         background: none !important;
</span><span class="cx"> }
</span><span class="cx">         ul#activity-filter-links li#afilter-blogs a {
</span><span class="lines">@@ -1257,7 +1290,7 @@
</span><span class="cx"> .activity-list li blockquote {
</span><span class="cx">         padding: 7px 15px 7px 40px;
</span><span class="cx">         background: url(../images/quotes_background.gif) 10px 9px no-repeat #eee;
</span><del>-        margin: -10px 0 15px 0;
</del><ins>+        margin: -10px -50px 15px 0;
</ins><span class="cx">         border-radius: 5px;
</span><span class="cx">         -moz-border-radius: 5px;
</span><span class="cx">         -webkit-border-radius: 5px;
</span><span class="lines">@@ -1319,6 +1352,8 @@
</span><span class="cx">         text-indent: -999em;
</span><span class="cx">         overflow: hidden;
</span><span class="cx"> }
</span><ins>+
+
</ins><span class="cx"> /**** BLOGS *****************/
</span><span class="cx">                 
</span><span class="cx"> #blog-info {
</span><span class="lines">@@ -1766,7 +1801,7 @@
</span><span class="cx">         width: 98%;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-a.delete {
</del><ins>+table#message-threads a.delete {
</ins><span class="cx">         overflow: hidden;
</span><span class="cx">         text-indent: -999px;
</span><span class="cx">         display: block;
</span><span class="lines">@@ -1777,7 +1812,7 @@
</span><span class="cx">         height: 13px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-span.unread-count {
</del><ins>+table#message-threads span.unread-count {
</ins><span class="cx">         background: #c2582b;
</span><span class="cx">         border: 2px solid #c2582b;
</span><span class="cx">         padding: 0 0.5em;
</span></span></pre></div>
<a id="trunkbpthemesbpsnframeworkactivitymyfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-framework/activity/my-friends.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-framework/activity/my-friends.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-themes/bp-sn-framework/activity/my-friends.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">                                                         &lt;/div&gt;
</span><span class="cx">                                                         
</span><span class="cx">                                                         &lt;?php bp_activity_content() ?&gt;
</span><del>-                                                        
</del><ins>+
</ins><span class="cx">                                                         &lt;?php do_action( 'bp_friends_activity_item' ) ?&gt;
</span><span class="cx">                                                 &lt;/li&gt;
</span><span class="cx">                                         &lt;?php endwhile; ?&gt;
</span></span></pre></div>
<a id="trunkbpwirebpwiretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-wire/bp-wire-templatetags.php (1690 => 1691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-wire/bp-wire-templatetags.php        2009-08-24 21:27:07 UTC (rev 1690)
+++ trunk/bp-wire/bp-wire-templatetags.php        2009-08-25 00:44:29 UTC (rev 1691)
</span><span class="lines">@@ -363,9 +363,9 @@
</span><span class="cx"> 
</span><span class="cx">                 if ( ( $wire_posts_template-&gt;wire_post-&gt;user_id == $bp-&gt;loggedin_user-&gt;id ) || $bp-&gt;is_item_admin || is_site_admin() ) {
</span><span class="cx">                         if ( $bp-&gt;wire-&gt;slug == $bp-&gt;current_component || $bp-&gt;profile-&gt;slug == $bp-&gt;current_component ) {
</span><del>-                                return apply_filters( 'bp_get_wire_delete_link', '&lt;a class=&quot;confirm&quot; href=&quot;' . wp_nonce_url( $bp-&gt;displayed_user-&gt;domain . $bp-&gt;wire-&gt;slug . '/delete/' . $wire_posts_template-&gt;wire_post-&gt;id, 'bp_wire_delete_link' ) . '&quot;&gt;[' . __('Delete', 'buddypress') . ']&lt;/a&gt;' );
</del><ins>+                                return apply_filters( 'bp_get_wire_delete_link', '&lt;a class=&quot;item-button delete confirm&quot; href=&quot;' . wp_nonce_url( $bp-&gt;displayed_user-&gt;domain . $bp-&gt;wire-&gt;slug . '/delete/' . $wire_posts_template-&gt;wire_post-&gt;id, 'bp_wire_delete_link' ) . '&quot;&gt;' . __('Delete', 'buddypress') . '&lt;/a&gt;' );
</ins><span class="cx">                         } else {
</span><del>-                                return apply_filters( 'bp_get_wire_delete_link', '&lt;a class=&quot;confirm&quot; href=&quot;' . wp_nonce_url( site_url( $bp-&gt;{$bp-&gt;current_component}-&gt;slug . '/' . $uri . '/wire/delete/' . $wire_posts_template-&gt;wire_post-&gt;id ), 'bp_wire_delete_link' ) . '&quot;&gt;[' . __('Delete', 'buddypress') . ']&lt;/a&gt;' );
</del><ins>+                                return apply_filters( 'bp_get_wire_delete_link', '&lt;a class=&quot;item-button delete confirm&quot; href=&quot;' . wp_nonce_url( site_url( $bp-&gt;{$bp-&gt;current_component}-&gt;slug . '/' . $uri . '/wire/delete/' . $wire_posts_template-&gt;wire_post-&gt;id ), 'bp_wire_delete_link' ) . '&quot;&gt;' . __('Delete', 'buddypress') . '&lt;/a&gt;' );
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre>
</div>
</div>

</body>
</html>