<!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] [1844] trunk: Added extra filtering on template loops,
applies to #980 props jeffsayre.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>1844</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-10 18:34:52 +0000 (Thu, 10 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Added extra filtering on template loops, applies to #980 props jeffsayre.</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="#trunkbpblogsbpblogstemplatetagsphp">trunk/bp-blogs/bp-blogs-templatetags.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatetagsphp">trunk/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#trunkbpfriendsbpfriendstemplatetagsphp">trunk/bp-friends/bp-friends-templatetags.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatetagsphp">trunk/bp-groups/bp-groups-templatetags.php</a></li>
<li><a href="#trunkbpmessagesbpmessagestemplatetagsphp">trunk/bp-messages/bp-messages-templatetags.php</a></li>
<li><a href="#trunkbpwirebpwiretemplatetagsphp">trunk/bp-wire/bp-wire-templatetags.php</a></li>
<li><a href="#trunkbpxprofilebpxprofiletemplatetagsphp">trunk/bp-xprofile/bp-xprofile-templatetags.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 (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-activity/bp-activity-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx">                 $filter = array( 'object' => $object, 'action' => $action, 'primary_id' => $primary_id, 'secondary_id' => $secondary_id );
</span><span class="cx">         
</span><span class="cx">         $activities_template = new BP_Activity_Template( $type, $user_id, $per_page, $max, $filter );                
</span><del>-        return $activities_template->has_activities();
</del><ins>+        return apply_filters( 'bp_has_activities', $activities_template->has_activities(), &$activities_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activities() {
</span></span></pre></div>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-activity.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -161,6 +161,8 @@
</span><span class="cx">                 bp_core_add_message( __( 'Activity deleted', 'buddypress' ) );
</span><span class="cx">         else
</span><span class="cx">                 bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
</span><ins>+                
+        do_action( 'bp_activity_action_delete_activity', $activity_id );
</ins><span class="cx">         
</span><span class="cx">         bp_core_redirect( $_SERVER['HTTP_REFERER'] );
</span><span class="cx"> }
</span><span class="lines">@@ -333,30 +335,30 @@
</span><span class="cx">                 $content = $before . ' <span class="time-since">%s</span>' . $after;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        return $content;
</del><ins>+        return apply_filters( 'bp_activity_add_timesince_placeholder', $content );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activity_check_exists_by_content( $content ) {
</span><span class="cx">         /* Insert the "time-since" placeholder to match the existing content in the DB */
</span><span class="cx">         $content = bp_activity_add_timesince_placeholder( $content );
</span><span class="cx">
</span><del>-        return BP_Activity_Activity::check_exists_by_content( $content );
</del><ins>+        return apply_filters( 'bp_activity_check_exists_by_content', BP_Activity_Activity::check_exists_by_content( $content ) );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activity_get_last_updated() {
</span><del>-        return BP_Activity_Activity::get_last_updated();
</del><ins>+        return apply_filters( 'bp_activity_get_last_updated', BP_Activity_Activity::get_last_updated() );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activity_get_sitewide_activity( $max_items = 30, $pag_num = false, $pag_page = false, $filter = false ) {
</span><del>-        return BP_Activity_Activity::get_sitewide_activity( $max_items, $pag_num, $pag_page, $filter );
</del><ins>+         return apply_filters( 'bp_activity_get_sitewide_activity', BP_Activity_Activity::get_sitewide_activity( $max_items, $pag_num, $pag_page, $filter ), $max_items, $pag_num, $pag_page, $filter );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activity_get_user_activity( $user_id, $max_items = 30, $pag_num = false, $pag_page = false, $filter = false ) {
</span><del>-        return BP_Activity_Activity::get_activity_for_user( $user_id, $max_items, $pag_num, $pag_page, $filter );
</del><ins>+        return apply_filters( 'bp_activity_get_user_activity', BP_Activity_Activity::get_activity_for_user( $user_id, $max_items, $pag_num, $pag_page, $filter ), $user_id, $max_items, $pag_num, $pag_page, $filter );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activity_get_friends_activity( $user_id, $max_items = 30, $max_items_per_friend = false, $pag_num = false, $pag_page = false, $filter = false ) {
</span><del>-        return BP_Activity_Activity::get_activity_for_friends( $user_id, $max_items, $max_items_per_friend, $pag_num, $pag_page, $filter );
</del><ins>+        return apply_filters( 'bp_activity_get_friends_activity', BP_Activity_Activity::get_activity_for_friends( $user_id, $max_items, $max_items_per_friend, $pag_num, $pag_page, $filter ), $user_id, $max_items, $max_items_per_friend, $pag_num, $pag_page, $filter );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_activity_remove_data( $user_id ) {
</span><span class="lines">@@ -371,7 +373,7 @@
</span><span class="cx">
</span><span class="cx"> /* Ordering function - don't call this directly */
</span><span class="cx"> function bp_activity_order_by_date( $a, $b ) {
</span><del>-        return strcasecmp( $b['date_recorded'], $a['date_recorded'] );        
</del><ins>+        return apply_filters( 'bp_activity_order_by_date', strcasecmp( $b['date_recorded'], $a['date_recorded'] ) );        
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpblogsbpblogstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-blogs/bp-blogs-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><span class="cx">         $blogs_template = new BP_Blogs_User_Blogs_Template( $user_id, $per_page, $max );
</span><del>-        return $blogs_template->has_blogs();
</del><ins>+        return apply_filters( 'bp_has_blogs', $blogs_template->has_blogs(), &$blogs_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_blogs() {
</span><span class="lines">@@ -484,7 +484,7 @@
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><span class="cx">         $posts_template = new BP_Blogs_Blog_Post_Template( $user_id, $per_page, $max );        
</span><del>-        return $posts_template->has_posts();
</del><ins>+        return apply_filters( 'bp_has_posts', $posts_template->has_posts(), &$posts_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_posts() {
</span><span class="lines">@@ -919,8 +919,7 @@
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">         
</span><span class="cx">         $comments_template = new BP_Blogs_Post_Comment_Template( $user_id, $per_page, $max );
</span><del>-        
-        return $comments_template->has_comments();
</del><ins>+        return apply_filters( 'bp_has_comments', $comments_template->has_comments(), &$comments_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_comments() {
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-forums/bp-forums-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx">         else
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        return $forum_template->has_topics();
</del><ins>+        return apply_filters( 'bp_has_topics', $forum_template->has_topics(), &$forum_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_topics() {
</span><span class="lines">@@ -599,7 +599,7 @@
</span><span class="cx">         else
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        return $topic_template->has_posts();
</del><ins>+        return apply_filters( 'bp_has_topic_posts', $topic_template->has_posts(), &$topic_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_topic_posts() {
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-friends/bp-friends-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx">                 $filter = $_REQUEST['friend-search-box'];
</span><span class="cx">
</span><span class="cx">         $friends_template = new BP_Friendship_Template( $user_id, $type, $per_page, $max, $filter );
</span><del>-        return $friends_template->has_friendships();
</del><ins>+        return apply_filters( 'bp_has_friendships', $friends_template->has_friendships(), &$friends_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_the_friendship() {
</span><span class="lines">@@ -344,31 +344,38 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_add_friend_button( $potential_friend_id = false ) {
</span><del>-        global $bp, $friends_template;
</del><ins>+        echo bp_get_add_friend_button();
+}
+        function bp_get_add_friend_button( $potential_friend_id = false ) {
+                global $bp, $friends_template;
</ins><span class="cx">         
</span><del>-        if ( is_user_logged_in() ) {
</del><ins>+                $button = false;
</ins><span class="cx">                 
</span><del>-                if ( !$potential_friend_id && $friends_template->friendship->friend )
-                        $potential_friend_id = $friends_template->friendship->friend->id;
-                else if ( !$potential_friend_id && !$friends_template->friendship->friend )
-                        $potential_friend_id = $bp->displayed_user->id;
</del><ins>+                if ( is_user_logged_in() ) {
+                
+                        if ( !$potential_friend_id && $friends_template->friendship->friend )
+                                $potential_friend_id = $friends_template->friendship->friend->id;
+                        else if ( !$potential_friend_id && !$friends_template->friendship->friend )
+                                $potential_friend_id = $bp->displayed_user->id;
</ins><span class="cx">
</span><del>-                if ( $bp->loggedin_user->id == $potential_friend_id )
-                        return false;
</del><ins>+                        if ( $bp->loggedin_user->id == $potential_friend_id )
+                                return false;
</ins><span class="cx">
</span><del>-                $friend_status = BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $potential_friend_id );
</del><ins>+                        $friend_status = BP_Friends_Friendship::check_is_friend( $bp->loggedin_user->id, $potential_friend_id );
</ins><span class="cx">
</span><del>-                echo '<div class="generic-button friendship-button ' . $friend_status . '" id="friendship-button-' . $potential_friend_id . '">';
-                if ( 'pending' == $friend_status ) {
-                        echo '<a class="requested" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
-                } else if ( 'is_friend' == $friend_status ) {
-                        echo '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id, 'friends_remove_friend' ) . '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>';
-                } else {
-                        echo '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id, 'friends_add_friend' ) . '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>';
</del><ins>+                        $button = '<div class="generic-button friendship-button ' . $friend_status . '" id="friendship-button-' . $potential_friend_id . '">';
+                        if ( 'pending' == $friend_status ) {
+                                $button .= '<a class="requested" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
+                        } else if ( 'is_friend' == $friend_status ) {
+                                $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id, 'friends_remove_friend' ) . '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>';
+                        } else {
+                                $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id, 'friends_add_friend' ) . '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>';
+                        }
+                        $button .= '</div>';
</ins><span class="cx">                 }
</span><del>-                echo '</div>';
</del><ins>+                
+                return apply_filters( 'bp_get_add_friend_button', $button );
</ins><span class="cx">         }
</span><del>-}
</del><span class="cx">
</span><span class="cx"> function bp_friends_header_tabs() {
</span><span class="cx">         global $bp, $create_group_step, $completed_to_step;
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-groups/bp-groups-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">                 $filter = $_REQUEST['group-filter-box'];
</span><span class="cx">         
</span><span class="cx">         $groups_template = new BP_Groups_User_Groups_Template( $user_id, $type, $per_page, $max, $slug, $filter );
</span><del>-        return $groups_template->has_groups();
</del><ins>+        return apply_filters( 'bp_has_groups', $groups_template->has_groups(), &$groups_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_groups() {
</span><span class="lines">@@ -1359,8 +1359,7 @@
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><span class="cx">         $members_template = new BP_Groups_Group_Members_Template( $group_id, $per_page, $max, (int)$exclude_admins_mods, (int)$exclude_banned );
</span><del>-        
-        return $members_template->has_members();
</del><ins>+        return apply_filters( 'bp_group_has_members', $members_template->has_members(), &$members_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_group_members() {
</span><span class="lines">@@ -1927,8 +1926,7 @@
</span><span class="cx">         }
</span><span class="cx">                 
</span><span class="cx">         $site_groups_template = new BP_Groups_Site_Groups_Template( $type, $per_page, $max );
</span><del>-
-        return $site_groups_template->has_groups();
</del><ins>+        return apply_filters( 'bp_has_site_groups', $site_groups_template->has_groups(), &$site_groups_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_site_groups() {
</span><span class="lines">@@ -2212,7 +2210,7 @@
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><span class="cx">         $requests_template = new BP_Groups_Membership_Requests_Template( $group_id, $per_page, $max );
</span><del>-        return $requests_template->has_requests();
</del><ins>+        return apply_filters( 'bp_group_has_membership_requests', $requests_template->has_requests(), &$requests_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_group_membership_requests() {
</span><span class="lines">@@ -2358,7 +2356,7 @@
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $invites_template = new BP_Groups_Invite_Template( $user_id, $group_id );
</span><del>-        return $invites_template->has_invites();
</del><ins>+        return apply_filters( 'bp_group_has_invites', $invites_template->has_invites(), &$invites_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_group_invites() {
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagestemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-messages/bp-messages-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">                 $messages_template = new BP_Messages_Box_Template( $user_id, $box, $per_page, $max, $type );
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        return $messages_template->has_threads();
</del><ins>+        return apply_filters( 'bp_has_message_threads', $messages_template->has_threads(), &$messages_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_message_threads() {
</span><span class="lines">@@ -433,20 +433,20 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_send_message_button() {
</span><del>-        global $bp;
</del><ins>+        echo bp_get_send_message_button();
+}
+        function bp_get_send_message_button() {
+                global $bp;
</ins><span class="cx">         
</span><del>-        if ( bp_is_home() || !is_user_logged_in() )
-                return false;
</del><ins>+                if ( bp_is_home() || !is_user_logged_in() )
+                        return false;
</ins><span class="cx">         
</span><del>-        $ud = get_userdata( $bp->displayed_user->id );
-        ?>
-        <div class="generic-button">
-                <a class="send-message" title="<?php _e( 'Send Message', 'buddypress' ) ?>" href="<?php echo $bp->loggedin_user->domain . $bp->messages->slug ?>/compose/?r=<?php echo $ud->user_login ?>"><?php _e( 'Send Message', 'buddypress' ) ?></a>
-        </div>
-        <?php
-}
</del><ins>+                $ud = get_userdata( $bp->displayed_user->id );
+                
+                return apply_filters( 'bp_get_send_message_button', '<div class="generic-button"><a class="send-message" title="' . __( 'Send Message', 'buddypress' ) . '" href="' . $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . $ud->user_login . '">' . __( 'Send Message', 'buddypress' ) . '</a></div>' );
+        }
</ins><span class="cx">
</span><del>-function bp_message_loading_image_src() {
</del><ins>+function bp_message_loading_imAage_src() {
</ins><span class="cx">         echo bp_get_message_loading_image_src();
</span><span class="cx"> }
</span><span class="cx">         function bp_get_message_loading_image_src() {
</span></span></pre></div>
<a id="trunkbpwirebpwiretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-wire/bp-wire-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-wire/bp-wire-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-wire/bp-wire-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">                 return false;
</span><span class="cx">                 
</span><span class="cx">         $wire_posts_template = new BP_Wire_Posts_Template( $item_id, $component_slug, $can_post, $per_page, $max );                
</span><del>-        return $wire_posts_template->has_wire_posts();
</del><ins>+        return apply_filters( 'bp_has_wire_posts', $wire_posts_template->has_wire_posts(), &$wire_posts_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_wire_posts() {
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofiletemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-templatetags.php (1843 => 1844)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-templatetags.php        2009-09-10 17:21:07 UTC (rev 1843)
+++ trunk/bp-xprofile/bp-xprofile-templatetags.php        2009-09-10 18:34:52 UTC (rev 1844)
</span><span class="lines">@@ -50,10 +50,9 @@
</span><span class="cx">                 $this->current_group++;
</span><span class="cx">
</span><span class="cx">                 $this->group = $this->groups[$this->current_group];
</span><del>-                $this->field_count = count($this->group->fields);
</del><span class="cx">                 
</span><span class="cx">                 if ( !$fields = wp_cache_get( 'xprofile_fields_' . $this->group->id . '_' . $this->user_id, 'bp' ) ) {
</span><del>-                        for ( $i = 0; $i < $this->field_count; $i++ ) {
</del><ins>+                        for ( $i = 0; $i < count($this->group->fields); $i++ ) {
</ins><span class="cx">                                 $field = new BP_XProfile_Field( $this->group->fields[$i]->id, $this->user_id );
</span><span class="cx">                                 $fields[$i] = $field;
</span><span class="cx">                         }
</span><span class="lines">@@ -61,7 +60,8 @@
</span><span class="cx">                         wp_cache_set( 'xprofile_fields_' . $this->group->id . '_' . $this->user_id, $fields, 'bp' );
</span><span class="cx">                 }
</span><span class="cx">                 
</span><del>-                $this->group->fields = $fields;
</del><ins>+                $this->group->fields = apply_filters( 'xprofile_group_fields', $fields, $this->group->id );
+                $this->field_count = count( $this->group->fields );
</ins><span class="cx">                 
</span><span class="cx">                 return $this->group;
</span><span class="cx">         }
</span><span class="lines">@@ -177,8 +177,7 @@
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">         
</span><span class="cx">         $profile_template = new BP_XProfile_Data_Template( $user_id, $profile_group_id );
</span><del>-        
-        return $profile_template->has_groups();
</del><ins>+        return apply_filters( 'bp_has_profile', $profile_template->has_groups(), $profile_template );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_profile_groups() {
</span></span></pre>
</div>
</div>
</body>
</html>