<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][9110] trunk/src/bp-activity/bp-activity-classes.php: Hook documentation for bp-activity-classes.php.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9110">9110</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9110","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>boonebgorges</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-10-30 23:55:04 +0000 (Thu, 30 Oct 2014)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Hook documentation for bp-activity-classes.php.

Props tw2113.
See <a href="http://buddypress.trac.wordpress.org/ticket/5938">#5938</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpactivitybpactivityclassesphp">trunk/src/bp-activity/bp-activity-classes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpactivitybpactivityclassesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/bp-activity-classes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/bp-activity-classes.php     2014-10-30 04:09:06 UTC (rev 9109)
+++ trunk/src/bp-activity/bp-activity-classes.php       2014-10-30 23:55:04 UTC (rev 9110)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -201,7 +201,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->mptt_right        = apply_filters_ref_array( 'bp_activity_mptt_right_before_save',        array( $this->mptt_right,        &$this ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->is_spam           = apply_filters_ref_array( 'bp_activity_is_spam_before_save',           array( $this->is_spam,           &$this ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Use this, not the filters above
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Fires before the current activity item gets saved.
+                *
+                * Please use this hook to filter the properties above. Each part will be passed in.
+                *
+                * @since BuddyPress (1.0.0)
+                *
+                * @param BP_Activity_Activity Current instance of the activity item being saved.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action_ref_array( 'bp_activity_before_save', array( &$this ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                if ( !$this->component || !$this->type )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -227,6 +235,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                else
</span><span class="cx" style="display: block; padding: 0 10px">                        add_filter( 'bp_activity_at_name_do_notifications', '__return_false' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Fires after an activity item has been saved to the database.
+                *
+                * @since BuddyPress (1.0.0)
+                *
+                * @param BP_Activity_Activity Reference to current instance of activity being saved.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action_ref_array( 'bp_activity_after_save', array( &$this ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return true;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -414,13 +429,29 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $where_conditions['excluded_types'] = "a.type NOT IN ({$not_in})";
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Filter the where conditions
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Filters the MySQL WHERE conditions for the Activity items get method.
+                *
+                * @since BuddyPress (1.9.0)
+                *
+                * @param array  $where_conditions Current conditions for MySQL WHERE statement.
+                * @param array  $r Parsed arguments passed into method.
+                * @param string $select_sql Current SELECT MySQL statement at point of execution.
+                * @param string $from_sql Current FROM MySQL statement at point of execution.
+                * @param string $join_sql Current INNER JOIN MySQL statement at point of execution.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 $where_conditions = apply_filters( 'bp_activity_get_where_conditions', $where_conditions, $r, $select_sql, $from_sql, $join_sql );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Join the where conditions together
</span><span class="cx" style="display: block; padding: 0 10px">                $where_sql = 'WHERE ' . join( ' AND ', $where_conditions );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Define the preferred order for indexes
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Filters the preferred order of indexes for activity item.
+                *
+                * @since Buddypress (1.6.0)
+                *
+                * @param array Array of indexes in preferred order.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 $indexes = apply_filters( 'bp_activity_preferred_index_order', array( 'user_id', 'item_id', 'secondary_item_id', 'date_recorded', 'component', 'type', 'hide_sitewide', 'is_spam' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                foreach( $indexes as $key => $index ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -446,7 +477,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'has_more_items' => null,
</span><span class="cx" style="display: block; padding: 0 10px">                );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Filter and return true to use the legacy query structure (not recommended)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Filters if BuddyPress should use legacy query structure over current structure for version 2.0+.
+                *
+                * It is not recommended to use the legacy structure, but allowed to if needed.
+                *
+                * @since BuddyPress (2.0.0)
+                *
+                * @param bool                 Whether to use legacy structure or not.
+                * @param BP_Activity_Activity Current method being called.
+                * @param array                $r Parsed arguments pased into method.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( apply_filters( 'bp_use_legacy_activity_query', false, __METHOD__, $r ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // Legacy queries joined against the user table
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -455,9 +496,23 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( ! empty( $page ) && ! empty( $per_page ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                $pag_sql    = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                               /** this filter is documented in bp-activity/bp-activity-classes.php */
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort} {$pag_sql}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
</span><span class="cx" style="display: block; padding: 0 10px">                        } else {
</span><span class="cx" style="display: block; padding: 0 10px">                                $pag_sql    = '';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                               /**
+                                * Filters the legacy MySQL query statement so plugins can alter before results are fetched.
+                                *
+                                * @since BuddyPress (1.5.0)
+                                *
+                                * @param string Concatenated MySQL statement pieces to be query results with for legacy query.
+                                * @param string $select_sql Final SELECT MySQL statement portion for legacy query.
+                                * @param string $from_sql Final FROM MySQL statement portion for legacy query.
+                                * @param string $where_sql Final WHERE MySQL statement portion for legacy query.
+                                * @param string $sort Final sort direction for legacy query.
+                                */
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $activities = $wpdb->get_results( apply_filters( 'bp_activity_get_user_join_filter', "{$select_sql} {$from_sql} {$join_sql} {$where_sql} ORDER BY a.date_recorded {$sort}", $select_sql, $from_sql, $where_sql, $sort, $pag_sql ) );
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -472,6 +527,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                $activity_ids_sql .= $wpdb->prepare( " LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page + 1 );
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        /**
+                        * Filters the paged activities MySQL statement.
+                        *
+                        * @since BuddyPress (2.0.0)
+                        *
+                        * @param string $activity_ids_sql MySQL statement used to query for Activity IDs.
+                        * @param array  $r Array of arguments passed into method.
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         $activity_ids_sql = apply_filters( 'bp_activity_paged_activities_sql', $activity_ids_sql, $r );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $activity_ids = $wpdb->get_col( $activity_ids_sql );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -514,6 +577,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                // If $max is set, only return up to the max results
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! empty( $r['count_total'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        /**
+                        * Filters the total activities MySQL statement.
+                        *
+                        * @since BuddyPress (1.5.0)
+                        *
+                        * @param string MySQL statement used to query for total activities.
+                        * @param string $where_sql MySQL WHERE statement portion.
+                        * @param string $sort sort direction for query.
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         $total_activities_sql = apply_filters( 'bp_activity_total_activities_sql', "SELECT count(DISTINCT a.id) FROM {$bp->activity->table_name} a {$join_sql} {$where_sql}", $where_sql, $sort );
</span><span class="cx" style="display: block; padding: 0 10px">                        $total_activities     = $wpdb->get_var( $total_activities_sql );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -640,6 +712,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array $activities Array of activities.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected static function prefetch_object_data( $activities ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               /**
+                * Filters inside prefetch_object_data method to aid in pre-fetching object data associated with activity item.
+                *
+                * @since BuddyPress (2.0.0)
+                *
+                * @param array $activities Array of activities.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 return apply_filters( 'bp_activity_prefetch_object_data', $activities );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1054,7 +1134,29 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        // Legacy query - not recommended
</span><span class="cx" style="display: block; padding: 0 10px">                        $func_args = func_get_args();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                       /**
+                        * Filters if BuddyPress should use the legacy activity query.
+                        *
+                        * @since BuddyPress (2.0.0)
+                        *
+                        * @param bool                 Whether or not to use the legacy query.
+                        * @param BP_Activity_Activity Magic method referring to currently called method.
+                        * @param array $func_args     Array of the method's argument list.
+                        */
</ins><span class="cx" style="display: block; padding: 0 10px">                         if ( apply_filters( 'bp_use_legacy_activity_query', false, __METHOD__, $func_args ) ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+                               /**
+                                * Filters the MySQL prepared statement for the legacy activity query.
+                                *
+                                * @since BuddyPress (1.5.0)
+                                *
+                                * @param string Prepared statement for the activity query.
+                                * @param int    $activity_id Activity ID to fetch comments for.
+                                * @param int    $left Left-most node boundary.
+                                * @param int    $right Right-most node boundary.
+                                * @param string $spam_sql SQL Statement portion to differentiate between ham or spam.
+                                */
</ins><span class="cx" style="display: block; padding: 0 10px">                                 $sql = apply_filters( 'bp_activity_comments_user_join_filter', $wpdb->prepare( "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name{$fullname_select} FROM {$bp->activity->table_name} a, {$wpdb->users} u{$fullname_from} WHERE u.ID = a.user_id {$fullname_where} AND a.type = 'activity_comment' {$spam_sql} AND a.item_id = %d AND a.mptt_left > %d AND a.mptt_left < %d ORDER BY a.date_recorded ASC", $top_level_parent_id, $left, $right ), $activity_id, $left, $right, $spam_sql );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                $descendants = $wpdb->get_results( $sql );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1450,7 +1552,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array $args Optional
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function __construct( $args = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // If feeds are disabled, stop now!
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               /**
+                * Filters if BuddyPress should consider feeds enabled. If disabled, it will return early.
+                *
+                * @since BuddyPress (1.8.0)
+                *
+                * @param bool true Default true aka feeds are enabled.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( false === (bool) apply_filters( 'bp_activity_enable_feeds', true ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        global $wp_query;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1496,7 +1605,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'activity_args'    => array()
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Plugins can use this filter to modify the feed before it is setup
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Fires before the feed is setup so plugins can modify.
+                *
+                * @since BuddyPress (1.8.0)
+                *
+                * @param BP_Activity_Feed Reference to current instance of activity feed.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action_ref_array( 'bp_activity_feed_prefetch', array( &$this ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Setup class properties
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1508,7 +1623,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        return false;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Plugins can use this filter to modify the feed after it's setup
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         /**
+                * Fires after the feed is setup so plugins can modify.
+                *
+                * @since BuddyPress (1.8.0)
+                *
+                * @param BP_Activity_Feed Reference to current instance of activity feed.
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action_ref_array( 'bp_activity_feed_postfetch', array( &$this ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Setup feed hooks
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1565,6 +1686,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Fire a hook to ensure backward compatibility for RSS attributes.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function backpat_rss_attributes() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               /**
+                * Fires inside backpat_rss_attributes method for backwards compatibility related to RSS attributes.
+                *
+                * This hook was originally separated out for individual components but has since been abstracted into the BP_Activity_Feed class.
+                *
+                * @since BuddyPress (1.0.0)
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action( 'bp_activity_' . $this->id . '_feed' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1572,6 +1701,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Fire a hook to ensure backward compatibility for channel elements.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function backpat_channel_elements() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               /**
+                * Fires inside backpat_channel_elements method for backwards compatibility related to RSS channel elements.
+                *
+                * This hook was originally separated out for individual components but has since been abstracted into the BP_Activity_Feed class.
+                *
+                * @since BuddyPress (1.0.0)
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action( 'bp_activity_' . $this->id . '_feed_head' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1594,6 +1731,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                break;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                /**
+                * Fires inside backpat_item_elements method for backwards compatibility related to RSS item elements.
+                *
+                * This hook was originally separated out for individual components but has since been abstracted into the BP_Activity_Feed class.
+                *
+                * @since BuddyPress (1.0.0)
+                */
</ins><span class="cx" style="display: block; padding: 0 10px">                 do_action( 'bp_activity_' . $id . '_feed_item' );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1719,7 +1863,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">        xmlns:atom="http://www.w3.org/2005/Atom"
</span><span class="cx" style="display: block; padding: 0 10px">        xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
</span><span class="cx" style="display: block; padding: 0 10px">        xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <?php do_action( 'bp_activity_feed_rss_attributes' ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
+
+       /**
+        * Fires at the end of the opening RSS tag for feed output so plugins can add extra attributes.
+        *
+        * @since BuddyPress (1.8.0)
+        */
+       do_action( 'bp_activity_feed_rss_attributes' ); ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> >
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> <channel>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1733,8 +1884,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">        <ttl><?php echo $this->ttl; ?></ttl>
</span><span class="cx" style="display: block; padding: 0 10px">        <sy:updatePeriod><?php echo $this->update_period; ?></sy:updatePeriod>
</span><span class="cx" style="display: block; padding: 0 10px">        <sy:updateFrequency><?php echo $this->update_frequency; ?></sy:updateFrequency>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        <?php do_action( 'bp_activity_feed_channel_elements' ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        /**
+        * Fires at the end of channel elements list in RSS feed so plugins can add extra channel elements.
+        *
+        * @since BuddyPress (1.8.0)
+        */
+       do_action( 'bp_activity_feed_channel_elements' ); ?>
+
</ins><span class="cx" style="display: block; padding: 0 10px">         <?php if ( bp_has_activities( $this->activity_args ) ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php while ( bp_activities() ) : bp_the_activity(); ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        <item>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1751,7 +1909,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        <slash:comments><?php bp_activity_comment_count(); ?></slash:comments>
</span><span class="cx" style="display: block; padding: 0 10px">                                <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <?php do_action( 'bp_activity_feed_item_elements' ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         <?php
+
+                               /**
+                                * Fires at the end of the individual RSS Item list in RSS feed so plugins can add extra item elements.
+                                *
+                                * @since BuddyPress (1.8.0)
+                                */
+                               do_action( 'bp_activity_feed_item_elements' ); ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </item>
</span><span class="cx" style="display: block; padding: 0 10px">                <?php endwhile; ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>