<!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] [2344] trunk: Refactor 'new_wire_post' and rename to '
 activity_update' for consistency.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2344</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-01-18 21:18:57 +0000 (Mon, 18 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Refactor 'new_wire_post' and rename to 'activity_update' for consistency. Some AJAX filters renamed to prevent &quot;_activity_activity_update&quot; naming issues due to refactoring. Actual 'new_wire_post' filter type moved to backpat Wire component.</pre>

<h3>Modified Paths</h3>
<ul>
<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="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityindexphp">trunk/bp-themes/bp-default/activity/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleactivityphp">trunk/bp-themes/bp-default/groups/single/activity.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleactivityphp">trunk/bp-themes/bp-default/members/single/activity.php</a></li>
<li><a href="#trunkbpthemesbpsnparent_incajaxphp">trunk/bp-themes/bp-sn-parent/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpsnparentfunctionsphp">trunk/bp-themes/bp-sn-parent/functions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-activity/bp-activity-templatetags.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">                 /* Filtering */
</span><span class="cx">                 'user_id' =&gt; false, // user_id to filter on
</span><span class="cx">                 'object' =&gt; false, // object to filter on e.g. groups, profile, status, friends
</span><del>-                'action' =&gt; false, // action to filter on e.g. new_wire_post, new_forum_post, profile_updated
</del><ins>+                'action' =&gt; false, // action to filter on e.g. activity_update, new_forum_post, profile_updated
</ins><span class="cx">                 'primary_id' =&gt; false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
</span><span class="cx">                 'secondary_id' =&gt; false, // secondary object ID to filter on e.g. a post_id
</span><span class="cx"> 
</span><span class="lines">@@ -732,7 +732,7 @@
</span><span class="cx">                 if ( ':' == substr( $title, -1 ) )
</span><span class="cx">                         $title = substr( $title, 0, -1 );
</span><span class="cx"> 
</span><del>-                if ( 'new_wire_post' == $activities_template-&gt;activity-&gt;component_action ) {
</del><ins>+                if ( 'activity_update' == $activities_template-&gt;activity-&gt;component_action ) {
</ins><span class="cx">                         $content = explode( '&lt;div class=&quot;activity-inner&quot;&gt;', $activities_template-&gt;activity-&gt;content );
</span><span class="cx">                         $title .= ': ' . strip_tags( bp_create_excerpt( $content[1], 15 ));
</span><span class="cx">                 }
</span></span></pre></div>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-activity.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">                  * array(
</span><span class="cx">                  *         'user_id' =&gt; false, // user_id to filter on
</span><span class="cx">                  *        'object' =&gt; false, // object to filter on e.g. groups, profile, status, friends
</span><del>-                 *        'action' =&gt; false, // action to filter on e.g. new_wire_post, profile_updated
</del><ins>+                 *        'action' =&gt; false, // action to filter on e.g. activity_update, profile_updated
</ins><span class="cx">                  *        'primary_id' =&gt; false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
</span><span class="cx">                  *        'secondary_id' =&gt; false, // secondary object ID to filter on e.g. a post_id
</span><span class="cx">                  * );
</span><span class="lines">@@ -434,7 +434,7 @@
</span><span class="cx">                 'content' =&gt; false, // The content of the activity item
</span><span class="cx">                 'primary_link' =&gt; false, // The primary URL for this item in RSS feeds
</span><span class="cx">                 'component_name' =&gt; false, // The name/ID of the component e.g. groups, profile, mycomponent
</span><del>-                'component_action' =&gt; false, // The component action e.g. new_wire_post, profile_updated
</del><ins>+                'component_action' =&gt; false, // The component action e.g. activity_update, profile_updated
</ins><span class="cx"> 
</span><span class="cx">                 'user_id' =&gt; $bp-&gt;loggedin_user-&gt;id, // Optional: The user to record the activity for, can be false if this activity is not for a user.
</span><span class="cx">                 'item_id' =&gt; false, // Optional: The ID of the specific item being recorded, e.g. a blog_id
</span><span class="lines">@@ -501,7 +501,7 @@
</span><span class="cx">                 'content' =&gt; apply_filters( 'bp_activity_new_update_content', $activity_content ),
</span><span class="cx">                 'primary_link' =&gt; apply_filters( 'bp_activity_new_update_primary_link', $primary_link ),
</span><span class="cx">                 'component_name' =&gt; $bp-&gt;activity-&gt;id,
</span><del>-                'component_action' =&gt; 'new_wire_post'
</del><ins>+                'component_action' =&gt; 'activity_update'
</ins><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="cx">         /* Add this update to the &quot;latest update&quot; usermeta so it can be fetched anywhere. */
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-groups.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -1917,7 +1917,7 @@
</span><span class="cx">                 'user_id' =&gt; $user_id,
</span><span class="cx">                 'content' =&gt; apply_filters( 'groups_activity_new_update_content', $activity_content ),
</span><span class="cx">                 'primary_link' =&gt; apply_filters( 'groups_activity_new_update_primary_link', bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) ),
</span><del>-                'component_action' =&gt; 'new_wire_post',
</del><ins>+                'component_action' =&gt; 'activity_update',
</ins><span class="cx">                 'item_id' =&gt; $bp-&gt;groups-&gt;current_group-&gt;id
</span><span class="cx">         ) );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-themes/bp-default/activity/index.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">                                         &lt;li id=&quot;activity-filter-select&quot; class=&quot;last&quot;&gt;
</span><span class="cx">                                                 &lt;select&gt;
</span><span class="cx">                                                         &lt;option value=&quot;-1&quot;&gt;&lt;?php _e( 'No Filter', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><del>-                                                        &lt;option value=&quot;new_wire_post&quot;&gt;&lt;?php _e( 'Show Updates', 'buddypress' ) ?&gt;&lt;/option&gt;
</del><ins>+                                                        &lt;option value=&quot;activity_update&quot;&gt;&lt;?php _e( 'Show Updates', 'buddypress' ) ?&gt;&lt;/option&gt;
</ins><span class="cx">                                                         &lt;option value=&quot;new_blog_post&quot;&gt;&lt;?php _e( 'Show Blog Posts', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                                         &lt;option value=&quot;new_blog_comment&quot;&gt;&lt;?php _e( 'Show Blog Comments', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                                         &lt;option value=&quot;new_forum_topic&quot;&gt;&lt;?php _e( 'Show New Forum Topics', 'buddypress' ) ?&gt;&lt;/option&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/activity.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/activity.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-themes/bp-default/groups/single/activity.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx">                 &lt;li id=&quot;activity-filter-select&quot; class=&quot;last&quot;&gt;
</span><span class="cx">                         &lt;select&gt;
</span><span class="cx">                                 &lt;option value=&quot;-1&quot;&gt;&lt;?php _e( 'No Filter', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><del>-                                &lt;option value=&quot;new_wire_post&quot;&gt;&lt;?php _e( 'Show Updates', 'buddypress' ) ?&gt;&lt;/option&gt;
</del><ins>+                                &lt;option value=&quot;activity_update&quot;&gt;&lt;?php _e( 'Show Updates', 'buddypress' ) ?&gt;&lt;/option&gt;
</ins><span class="cx">                                 &lt;option value=&quot;new_forum_topic&quot;&gt;&lt;?php _e( 'Show New Forum Topics', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                 &lt;option value=&quot;new_forum_post&quot;&gt;&lt;?php _e( 'Show Forum Replies', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                 &lt;option value=&quot;joined_group&quot;&gt;&lt;?php _e( 'Show New Group Memberships', 'buddypress' ) ?&gt;&lt;/option&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/activity.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/activity.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-themes/bp-default/members/single/activity.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx">                 &lt;li id=&quot;activity-filter-select&quot; class=&quot;last&quot;&gt;
</span><span class="cx">                         &lt;select&gt;
</span><span class="cx">                                 &lt;option value=&quot;-1&quot;&gt;&lt;?php _e( 'No Filter', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><del>-                                &lt;option value=&quot;new_wire_post&quot;&gt;&lt;?php _e( 'Show Updates', 'buddypress' ) ?&gt;&lt;/option&gt;
</del><ins>+                                &lt;option value=&quot;activity_update&quot;&gt;&lt;?php _e( 'Show Updates', 'buddypress' ) ?&gt;&lt;/option&gt;
</ins><span class="cx">                                 &lt;option value=&quot;new_blog_post&quot;&gt;&lt;?php _e( 'Show Blog Posts', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                 &lt;option value=&quot;new_blog_comment&quot;&gt;&lt;?php _e( 'Show Blog Comments', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                 &lt;option value=&quot;new_forum_topic&quot;&gt;&lt;?php _e( 'Show New Forum Topics', 'buddypress' ) ?&gt;&lt;/option&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpsnparent_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/_inc/ajax.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/_inc/ajax.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-themes/bp-sn-parent/_inc/ajax.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -446,12 +446,12 @@
</span><span class="cx">                 /* Now write the values */
</span><span class="cx">                 $activity_id = xprofile_record_activity( array(
</span><span class="cx">                         'user_id' =&gt; $bp-&gt;loggedin_user-&gt;id,
</span><del>-                        'content' =&gt; apply_filters( 'xprofile_activity_new_wire_post', $activity_content, &amp;$wire_post ),
-                        'primary_link' =&gt; apply_filters( 'xprofile_activity_new_wire_post_primary_link', $primary_link ),
-                        'component_action' =&gt; 'new_wire_post'
</del><ins>+                        'content' =&gt; apply_filters( 'xprofile_activity_update', $activity_content, &amp;$wire_post ),
+                        'primary_link' =&gt; apply_filters( 'xprofile_activity_update_primary_link', $primary_link ),
+                        'component_action' =&gt; 'activity_update'
</ins><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                do_action( 'xprofile_new_wire_post', &amp;$wire_post );
</del><ins>+                do_action( 'xprofile_activity_update', &amp;$wire_post );
</ins><span class="cx">         } else {
</span><span class="cx">                 $bp-&gt;groups-&gt;current_group = new BP_Groups_Group( $item_id );
</span><span class="cx"> 
</span><span class="lines">@@ -461,13 +461,13 @@
</span><span class="cx">                 $activity_content .= '&lt;div class=&quot;activity-inner&quot;&gt;' . $_POST['content'] . '&lt;/div&gt;';
</span><span class="cx"> 
</span><span class="cx">                 $activity_id = groups_record_activity( array(
</span><del>-                        'content' =&gt; apply_filters( 'groups_activity_new_wire_post', $activity_content ),
-                        'primary_link' =&gt; apply_filters( 'groups_activity_new_wire_post_primary_link', bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) ),
-                        'component_action' =&gt; 'new_wire_post',
</del><ins>+                        'content' =&gt; apply_filters( 'groups_activity_update', $activity_content ),
+                        'primary_link' =&gt; apply_filters( 'groups_activity_update_primary_link', bp_get_group_permalink( $bp-&gt;groups-&gt;current_group ) ),
+                        'component_action' =&gt; 'activity_update',
</ins><span class="cx">                         'item_id' =&gt; $item_id
</span><span class="cx">                 ) );
</span><span class="cx"> 
</span><del>-                do_action( 'groups_new_wire_post', $item_id, $wire_post-&gt;id );
</del><ins>+                do_action( 'groups_activity_update', $item_id, $wire_post-&gt;id );
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if ( !$activity_id ) {
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/functions.php (2343 => 2344)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/functions.php        2010-01-18 20:00:33 UTC (rev 2343)
+++ trunk/bp-themes/bp-sn-parent/functions.php        2010-01-18 21:18:57 UTC (rev 2344)
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">                                 &lt;li id=&quot;activity-filter-select&quot;&gt;
</span><span class="cx">                                         &lt;select&gt;
</span><span class="cx">                                                 &lt;option value=&quot;-1&quot;&gt;&lt;?php _e( 'No Filter', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><del>-                                                &lt;option value=&quot;new_wire_post&quot;&gt;&lt;?php _e( 'Updates Only', 'buddypress' ) ?&gt;&lt;/option&gt;
</del><ins>+                                                &lt;option value=&quot;activity_update&quot;&gt;&lt;?php _e( 'Updates Only', 'buddypress' ) ?&gt;&lt;/option&gt;
</ins><span class="cx">                                                 &lt;option value=&quot;new_forum_post,new_forum_topic&quot;&gt;&lt;?php _e( 'Group Forum Activity Only', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx">                                                 &lt;option value=&quot;new_blog_post,new_blog_comment&quot;&gt;&lt;?php _e( 'Blog Activity Only', 'buddypress' ) ?&gt;&lt;/option&gt;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>