<!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] [1750] trunk: Further activity action revisions.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>1750</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-01 02:12:35 +0000 (Tue, 01 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Further activity action revisions.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpblogsphp">trunk/bp-blogs.php</a></li>
<li><a href="#trunkbpfriendsphp">trunk/bp-friends.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpstatusphp">trunk/bp-status.php</a></li>
<li><a href="#trunkbpxprofilephp">trunk/bp-xprofile.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (1749 => 1750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2009-09-01 01:45:37 UTC (rev 1749)
+++ trunk/bp-activity.php        2009-09-01 02:12:35 UTC (rev 1750)
</span><span class="lines">@@ -323,7 +323,7 @@
</span><span class="cx"> function bp_activity_delete_for_user_by_component( $user_id, $component_name ) {
</span><span class="cx">         if ( !BP_Activity_Activity::delete_for_user_by_component( $user_id, $component_name ) )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+
</ins><span class="cx">         do_action( 'bp_activity_delete_for_user_by_component', $user_id, $component_name );
</span><span class="cx">         
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="trunkbpblogsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs.php (1749 => 1750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs.php        2009-09-01 01:45:37 UTC (rev 1749)
+++ trunk/bp-blogs.php        2009-09-01 02:12:35 UTC (rev 1750)
</span><span class="lines">@@ -117,11 +117,6 @@
</span><span class="cx">         $bp-&gt;blogs-&gt;format_notification_function = 'bp_blogs_format_notifications';
</span><span class="cx">         $bp-&gt;blogs-&gt;slug = BP_BLOGS_SLUG;
</span><span class="cx">         
</span><del>-        /* Register the activity stream actions for this component */
-        bp_blogs_register_activity_action( 'new_blog', __( 'New blog created', 'buddypress' ) );
-        bp_blogs_register_activity_action( 'new_blog_post', __( 'New blog post published', 'buddypress' ) );
-        bp_blogs_register_activity_action( 'new_blog_comment', __( 'New blog post comment posted', 'buddypress' ) );
-
</del><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;blogs-&gt;slug] = $bp-&gt;blogs-&gt;id;
</span><span class="cx"> }
</span><span class="lines">@@ -224,6 +219,20 @@
</span><span class="cx">  * notifications for the user and for this specific component.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function bp_blogs_register_activity_actions() {
+        global $bp;
+        
+        if ( !function_exists( 'bp_activity_set_action' ) )
+                return false;
+
+        bp_activity_set_action( $bp-&gt;blogs-&gt;id, 'new_blog', __( 'New blog created', 'buddypress' ) );
+        bp_activity_set_action( $bp-&gt;blogs-&gt;id, 'new_blog_post', __( 'New blog post published', 'buddypress' ) );
+        bp_activity_set_action( $bp-&gt;blogs-&gt;id, 'new_blog_comment', __( 'New blog post comment posted', 'buddypress' ) );
+
+        do_action( 'bp_blogs_register_activity_actions' );
+}
+add_action( 'plugins_loaded', 'bp_blogs_register_activity_actions' );
+
</ins><span class="cx"> function bp_blogs_record_activity( $args = '' ) {
</span><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="lines">@@ -260,15 +269,6 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function bp_blogs_register_activity_action( $key, $value ) {
-        global $bp;
-        
-        if ( !function_exists( 'bp_activity_set_action' ) )
-                return false;
-        
-        return apply_filters( 'bp_blogs_register_activity_action', bp_activity_set_action( $bp-&gt;blogs-&gt;id, $key, $value ), $key, $value );
-}
-
</del><span class="cx"> /********************************************************************************
</span><span class="cx">  * Business Functions
</span><span class="cx">  *
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx">                 'user_id' =&gt; $recorded_blog-&gt;user_id,
</span><span class="cx">                 'content' =&gt; sprintf( __( '%s created the blog %s', 'buddypress'), bp_core_get_userlink( $recorded_blog-&gt;user_id ), '&lt;a href=&quot;' . get_blog_option( $recorded_blog-&gt;blog_id, 'siteurl' ) . '&quot;&gt;' . attribute_escape( $name ) . '&lt;/a&gt;' ), 
</span><span class="cx">                 'primary_link' =&gt; get_blog_option( $recorded_blog-&gt;blog_id, 'siteurl' ),
</span><del>-                'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;blogs['new_blog'],
</del><ins>+                'component_action' =&gt; 'new_blog',
</ins><span class="cx">                 'item_id' =&gt; $recorded_blog_id
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="lines">@@ -376,7 +376,7 @@
</span><span class="cx">                                 'user_id' =&gt; (int)$post-&gt;post_author,
</span><span class="cx">                                 'content' =&gt; sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post-&gt;post_author ), '&lt;a href=&quot;' . $post_permalink . '&quot;&gt;' . $post-&gt;post_title . '&lt;/a&gt;' ), 
</span><span class="cx">                                 'primary_link' =&gt; $post_permalink,
</span><del>-                                'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;blogs['new_blog_post'],
</del><ins>+                                'component_action' =&gt; 'new_blog_post',
</ins><span class="cx">                                 'item_id' =&gt; $recorded_post-&gt;id,
</span><span class="cx">                                 'recorded_time' =&gt; $recorded_post-&gt;date_created
</span><span class="cx">                         ) );
</span><span class="lines">@@ -411,7 +411,7 @@
</span><span class="cx">                         'user_id' =&gt; (int)$post-&gt;post_author,
</span><span class="cx">                         'content' =&gt; sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post-&gt;post_author ), '&lt;a href=&quot;' . $post_permalink . '&quot;&gt;' . $post-&gt;post_title . '&lt;/a&gt;' ), 
</span><span class="cx">                         'primary_link' =&gt; $post_permalink,
</span><del>-                        'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;blogs['new_blog_post'],
</del><ins>+                        'component_action' =&gt; 'new_blog_post',
</ins><span class="cx">                         'item_id' =&gt; $existing_post-&gt;id,
</span><span class="cx">                         'recorded_time' =&gt; $existing_post-&gt;date_created
</span><span class="cx">                 ) );
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx">                 'user_id' =&gt; $recorded_comment-&gt;user_id,
</span><span class="cx">                 'content' =&gt; $content, 
</span><span class="cx">                 'primary_link' =&gt; $comment_link,
</span><del>-                'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;blogs['new_blog_comment'],
</del><ins>+                'component_action' =&gt; 'new_blog_comment',
</ins><span class="cx">                 'item_id' =&gt; $recorded_comment-&gt;blog_id,
</span><span class="cx">                 'recorded_time' =&gt;  $recorded_comment-&gt;date_created 
</span><span class="cx">         ) );
</span><span class="lines">@@ -481,7 +481,7 @@
</span><span class="cx">                 'user_id' =&gt; $recorded_comment-&gt;user_id,
</span><span class="cx">                 'content' =&gt; $content, 
</span><span class="cx">                 'primary_link' =&gt; $comment_link,
</span><del>-                'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;blogs['new_blog_comment'],
</del><ins>+                'component_action' =&gt; 'new_blog_comment',
</ins><span class="cx">                 'item_id' =&gt; $recorded_comment-&gt;blog_id,
</span><span class="cx">                 'recorded_time' =&gt;  $recorded_comment-&gt;date_created 
</span><span class="cx">         ) );
</span></span></pre></div>
<a id="trunkbpfriendsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends.php (1749 => 1750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends.php        2009-09-01 01:45:37 UTC (rev 1749)
+++ trunk/bp-friends.php        2009-09-01 02:12:35 UTC (rev 1750)
</span><span class="lines">@@ -46,10 +46,7 @@
</span><span class="cx">         $bp-&gt;friends-&gt;format_activity_function = 'friends_format_activity';
</span><span class="cx">         $bp-&gt;friends-&gt;format_notification_function = 'friends_format_notifications';
</span><span class="cx">         $bp-&gt;friends-&gt;slug = BP_FRIENDS_SLUG;
</span><del>-
-        /* Register the activity stream actions for this component */
-        friends_register_activity_action( 'friendship_created', __( 'New friendship created', 'buddypress' ) );
-
</del><ins>+        
</ins><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;friends-&gt;slug] = $bp-&gt;friends-&gt;id;
</span><span class="cx"> }
</span><span class="lines">@@ -325,14 +322,17 @@
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function friends_register_activity_action( $key, $value ) {
</del><ins>+function friends_register_activity_actions() {
</ins><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="cx">         if ( !function_exists( 'bp_activity_set_action' ) )
</span><span class="cx">                 return false;
</span><del>-        
-        return apply_filters( 'friends_register_activity_action', bp_activity_set_action( $bp-&gt;friends-&gt;id, $key, $value ), $key, $value );
</del><ins>+
+        bp_activity_set_action( $bp-&gt;friends-&gt;id, 'friends_register_activity_action', __( 'New friendship created', 'buddypress' ) );
+
+        do_action( 'friends_register_activity_actions' );
</ins><span class="cx"> }
</span><ins>+add_action( 'plugins_loaded', 'friends_register_activity_actions' );
</ins><span class="cx"> 
</span><span class="cx"> function friends_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) {
</span><span class="cx">         global $bp;
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (1749 => 1750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2009-09-01 01:45:37 UTC (rev 1749)
+++ trunk/bp-groups.php        2009-09-01 02:12:35 UTC (rev 1750)
</span><span class="lines">@@ -147,13 +147,6 @@
</span><span class="cx">         ) );
</span><span class="cx">         
</span><span class="cx">         $bp-&gt;groups-&gt;valid_status = apply_filters( 'groups_valid_status', array( 'public', 'private', 'hidden' ) );
</span><del>-
-        /* Register the activity stream actions for this component */
-        groups_register_activity_action( 'created_group', __( 'Created a group', 'buddypress' ) );
-        groups_register_activity_action( 'joined_group', __( 'Joined a group', 'buddypress' ) );
-        groups_register_activity_action( 'new_wire_post', __( 'New group wire post', 'buddypress' ) );
-        groups_register_activity_action( 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );
-        groups_register_activity_action( 'new_forum_post', __( 'New group forum post', 'buddypress' ) );
</del><span class="cx"> }
</span><span class="cx"> add_action( 'plugins_loaded', 'groups_setup_globals', 5 );        
</span><span class="cx"> add_action( 'admin_menu', 'groups_setup_globals', 2 );
</span><span class="lines">@@ -1373,6 +1366,22 @@
</span><span class="cx">  * notifications for the user and for this specific component.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function groups_register_activity_actions() {
+        global $bp;
+        
+        if ( !function_exists( 'bp_activity_set_action' ) )
+                return false;
+
+        bp_activity_set_action( $bp-&gt;groups-&gt;id, 'created_group', __( 'Created a group', 'buddypress' ) );
+        bp_activity_set_action( $bp-&gt;groups-&gt;id, 'joined_group', __( 'Joined a group', 'buddypress' ) );
+        bp_activity_set_action( $bp-&gt;groups-&gt;id, 'new_wire_post', __( 'New group wire post', 'buddypress' ) );
+        bp_activity_set_action( $bp-&gt;groups-&gt;id, 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );
+        bp_activity_set_action( $bp-&gt;groups-&gt;id, 'new_forum_post', __( 'New group forum post', 'buddypress' ) );
+
+        do_action( 'groups_register_activity_actions' );
+}
+add_action( 'plugins_loaded', 'groups_register_activity_actions' );
+
</ins><span class="cx"> function groups_record_activity( $args = '' ) {
</span><span class="cx">         global $bp;
</span><span class="cx">         
</span><span class="lines">@@ -1401,15 +1410,6 @@
</span><span class="cx">         return bp_activity_add( array( 'user_id' =&gt; $user_id, 'content' =&gt; $content, 'primary_link' =&gt; $primary_link, 'component_name' =&gt; $component_name, 'component_action' =&gt; $component_action, 'item_id' =&gt; $item_id, 'secondary_item_id' =&gt; $secondary_item_id, 'recorded_time' =&gt; $recorded_time, 'hide_sitewide' =&gt; $hide_sitewide ) );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function groups_register_activity_action( $key, $value ) {
-        global $bp;
-        
-        if ( !function_exists( 'bp_activity_set_action' ) )
-                return false;
-        
-        return apply_filters( 'groups_register_activity_action', bp_activity_set_action( $bp-&gt;groups-&gt;id, $key, $value ), $key, $value );
-}
-
</del><span class="cx"> function groups_update_last_activity( $group_id ) {
</span><span class="cx">         groups_update_groupmeta( $group_id, 'last_activity', time() );
</span><span class="cx"> }
</span><span class="lines">@@ -1676,7 +1676,7 @@
</span><span class="cx"> 
</span><span class="cx">         /* Delete the activity stream item */
</span><span class="cx">         if ( function_exists( 'bp_activity_delete_by_item_id' ) ) {
</span><del>-                bp_activity_delete_by_item_id( array( 'item_id' =&gt; $group_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;groups['created_group'] ) );
</del><ins>+                bp_activity_delete_by_item_id( array( 'item_id' =&gt; $group_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; 'created_group' ) );
</ins><span class="cx">         }        
</span><span class="cx">  
</span><span class="cx">         // Remove all outstanding invites for this group
</span><span class="lines">@@ -1991,7 +1991,7 @@
</span><span class="cx">         if ( bp_wire_delete_post( $wire_post_id, 'groups', $table_name ) ) {
</span><span class="cx">                 /* Delete the activity stream item */
</span><span class="cx">                 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) {
</span><del>-                        bp_activity_delete_by_item_id( array( 'item_id' =&gt; $wire_post_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;groups['new_wire_post'] ) );
</del><ins>+                        bp_activity_delete_by_item_id( array( 'item_id' =&gt; $wire_post_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; 'new_wire_post' ) );
</ins><span class="cx">                 }
</span><span class="cx">                         
</span><span class="cx">                 do_action( 'groups_deleted_wire_post', $wire_post_id );
</span><span class="lines">@@ -2079,7 +2079,7 @@
</span><span class="cx">         
</span><span class="cx">         if ( $topic = bp_forums_update_topic( array( 'topic_title' =&gt; $topic_title, 'topic_text' =&gt; $topic_text, 'topic_id' =&gt; $topic_id ) ) ) {
</span><span class="cx">                 /* Update the activity stream item */
</span><del>-                bp_activity_delete_by_item_id( array( 'item_id' =&gt; $topic_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;groups['new_forum_topic'] ) );
</del><ins>+                bp_activity_delete_by_item_id( array( 'item_id' =&gt; $topic_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; 'new_forum_topic' ) );
</ins><span class="cx">                 
</span><span class="cx">                 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $topic-&gt;topic_poster ), '&lt;a href=&quot;' . bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) . '/forum/topic/' . $topic-&gt;topic_slug .'&quot;&gt;' . attribute_escape( $topic-&gt;topic_title ) . '&lt;/a&gt;', '&lt;a href=&quot;' . bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) . '&quot;&gt;' . attribute_escape( $bp-&gt;groups-&gt;current_group-&gt;name ) . '&lt;/a&gt;' );
</span><span class="cx">                 $activity_content .= '&lt;blockquote&gt;' . bp_create_excerpt( attribute_escape( $topic_text ) ) . '&lt;/blockquote&gt;';
</span><span class="lines">@@ -2109,7 +2109,7 @@
</span><span class="cx">         if ( bp_forums_delete_topic( array( 'topic_id' =&gt; $topic_id ) ) ) {
</span><span class="cx">                 /* Delete the activity stream item */
</span><span class="cx">                 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) {
</span><del>-                        bp_activity_delete_by_item_id( array( 'item_id' =&gt; $topic_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; $bp-&gt;activity-&gt;actions-&gt;groups['new_forum_topic'] ) );
</del><ins>+                        bp_activity_delete_by_item_id( array( 'item_id' =&gt; $topic_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; 'new_forum_topic' ) );
</ins><span class="cx">                         bp_activity_delete_by_item_id( array( 'item_id' =&gt; $topic_id, 'component_name' =&gt; 'groups', 'component_action' =&gt; 'new_forum_post' ) );
</span><span class="cx">                 }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpstatusphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-status.php (1749 => 1750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-status.php        2009-09-01 01:45:37 UTC (rev 1749)
+++ trunk/bp-status.php        2009-09-01 02:12:35 UTC (rev 1750)
</span><span class="lines">@@ -12,9 +12,6 @@
</span><span class="cx">         $bp-&gt;status-&gt;id = 'status';
</span><span class="cx">         $bp-&gt;status-&gt;slug = BP_STATUS_SLUG;
</span><span class="cx">         
</span><del>-        /* Register the activity stream actions for this component */
-        bp_status_register_activity_action( 'new_status', __( 'New status update', 'buddypress' ) );
-
</del><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;status-&gt;slug] = $bp-&gt;status-&gt;id;
</span><span class="cx"> }
</span><span class="lines">@@ -29,6 +26,19 @@
</span><span class="cx">  * notifications for the user and for this specific component.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function bp_status_register_activity_actions() {
+        global $bp;
+        
+        if ( !function_exists( 'bp_activity_set_action' ) )
+                return false;
+
+        /* Register the activity stream actions for this component */
+        bp_activity_set_action( $bp-&gt;status-&gt;id, 'new_status', __( 'New status update', 'buddypress' ) );
+
+        do_action( 'bp_status_register_activity_actions' );
+}
+add_action( 'plugins_loaded', 'bp_status_register_activity_actions' );
+
</ins><span class="cx"> function bp_status_record_activity( $user_id, $content, $primary_link, $component_action = 'new_status' ) {
</span><span class="cx">         if ( !function_exists( 'bp_activity_add' ) )
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (1749 => 1750)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2009-09-01 01:45:37 UTC (rev 1749)
+++ trunk/bp-xprofile.php        2009-09-01 02:12:35 UTC (rev 1750)
</span><span class="lines">@@ -140,9 +140,6 @@
</span><span class="cx">         $bp-&gt;profile-&gt;format_notification_function = 'xprofile_format_notifications';
</span><span class="cx">         $bp-&gt;profile-&gt;slug = BP_XPROFILE_SLUG;
</span><span class="cx"> 
</span><del>-        /* Register the activity stream actions for this component */
-        xprofile_register_activity_action( 'new_wire_post', __( 'New profile wire post', 'buddypress' ) );
-
</del><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;profile-&gt;slug] = $bp-&gt;profile-&gt;id;
</span><span class="cx">         
</span><span class="lines">@@ -579,6 +576,19 @@
</span><span class="cx">  * notifications for the user and for this specific component.
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+function xprofile_register_activity_actions() {
+        global $bp;
+        
+        if ( !function_exists( 'bp_activity_set_action' ) )
+                return false;
+
+        /* Register the activity stream actions for this component */
+        bp_activity_set_action( $bp-&gt;profile-&gt;id, 'new_wire_post', __( 'New profile wire post', 'buddypress' ) );
+
+        do_action( 'xprofile_register_activity_actions' );
+}
+add_action( 'plugins_loaded', 'xprofile_register_activity_actions' );
+
</ins><span class="cx"> /**
</span><span class="cx">  * xprofile_record_activity()
</span><span class="cx">  *
</span></span></pre>
</div>
</div>

</body>
</html>