<!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][5797] trunk: Adds a toggle that allows admins to force a default visibility for a given profile field.</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, #logmsg > ol { margin-left: 0; 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">
<dt>Revision</dt> <dd><a href="http://buddypress.trac.wordpress.org/changeset/5797">5797</a></dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2012-02-16 22:07:10 +0000 (Thu, 16 Feb 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Adds a toggle that allows admins to force a default visibility for a given profile field.
Prevents users from seeing the visibility customization markup when a field's visibility is forced.
Modifies appearance of visibility toggles/messages in edit.php.
Introduces bp-xprofile-caps.php to accomplish all of this.
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/4015">#4015</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcorehooksphp">trunk/bp-core/bp-core-hooks.php</a></li>
<li><a href="#trunkbpthemesbpdefault_inccssdefaultcss">trunk/bp-themes/bp-default/_inc/css/default.css</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleprofileeditphp">trunk/bp-themes/bp-default/members/single/profile/edit.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileadminphp">trunk/bp-xprofile/bp-xprofile-admin.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileclassesphp">trunk/bp-xprofile/bp-xprofile-classes.php</a></li>
<li><a href="#trunkbpxprofilebpxprofilefiltersphp">trunk/bp-xprofile/bp-xprofile-filters.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileloaderphp">trunk/bp-xprofile/bp-xprofile-loader.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkbpxprofilebpxprofilecapsphp">trunk/bp-xprofile/bp-xprofile-caps.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcorehooksphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-hooks.php (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-hooks.php        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-core/bp-core-hooks.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -76,6 +76,11 @@
</span><span class="cx"> // Setup the navigation menu
</span><span class="cx"> add_action( 'admin_bar_menu', 'bp_setup_admin_bar', 11 );
</span><span class="cx"> 
</span><ins>+/** Roles and Capabilities ****************************************************/
+
+// Map our custom capabilities onto WP's
+add_filter( 'map_meta_cap', 'bp_map_meta_caps', 10, 4 );
+
</ins><span class="cx"> /** The hooks *****************************************************************/
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -2384,6 +2384,11 @@
</span><span class="cx"> .current-visibility-level {
</span><span class="cx">         font-weight: bold;
</span><span class="cx"> }
</span><ins>+.field-visibility-settings,
+.field-visibility-settings-toggle,
+.field-visibility-settings-notoggle {
+        color: #888;
+}
</ins><span class="cx"> .field-visibility-settings-toggle a,
</span><span class="cx"> .field-visibility-settings a {
</span><span class="cx">         font-size: .9em;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleprofileeditphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/profile/edit.php (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/profile/edit.php        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-themes/bp-default/members/single/profile/edit.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -113,8 +113,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="cx">                                 
</span><del>-                                &lt;?php /* The fullname field is always public */ ?&gt;
-                                &lt;?php if ( 1 != bp_get_the_profile_field_id() ) : ?&gt;
</del><ins>+                                &lt;?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?&gt;
</ins><span class="cx">                                         &lt;div class=&quot;field-visibility-settings-toggle&quot; id=&quot;field-visibility-settings-toggle-&lt;?php bp_the_profile_field_id() ?&gt;&quot;&gt;
</span><span class="cx">                                                 &lt;?php printf( __( 'This field can be seen by: &lt;span class=&quot;current-visibility-level&quot;&gt;%s&lt;/span&gt;', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?&gt; &lt;a href=&quot;#&quot; class=&quot;visibility-toggle-link&quot;&gt;Change&lt;/a&gt;
</span><span class="cx">                                         &lt;/div&gt;
</span><span class="lines">@@ -126,6 +125,10 @@
</span><span class="cx">                                                 
</span><span class="cx">                                                 &lt;a class=&quot;field-visibility-settings-close&quot; href=&quot;#&quot;&gt;&lt;?php _e( 'Close', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><span class="cx">                                         &lt;/div&gt;
</span><ins>+                                &lt;?php else : ?&gt;
+                                        &lt;div class=&quot;field-visibility-settings-notoggle&quot; id=&quot;field-visibility-settings-toggle-&lt;?php bp_the_profile_field_id() ?&gt;&quot;&gt;
+                                                &lt;?php printf( __( 'This field can be seen by: &lt;span class=&quot;current-visibility-level&quot;&gt;%s&lt;/span&gt;', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?&gt;
+                                        &lt;/div&gt;                        
</ins><span class="cx">                                 &lt;?php endif ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;?php do_action( 'bp_custom_profile_edit_fields' ); ?&gt;
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-admin.php (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-admin.php        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-xprofile/bp-xprofile-admin.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -274,6 +274,10 @@
</span><span class="cx">                                 if ( !empty( $_POST['default-visibility'] ) ) {
</span><span class="cx">                                         bp_xprofile_update_field_meta( $field_id, 'default_visibility', $_POST['default-visibility'] );
</span><span class="cx">                                 }
</span><ins>+                                
+                                if ( !empty( $_POST['allow-custom-visibility'] ) ) {
+                                        bp_xprofile_update_field_meta( $field_id, 'allow_custom_visibility', $_POST['allow-custom-visibility'] );
+                                }
</ins><span class="cx"> 
</span><span class="cx">                                 unset( $_GET['mode'] );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofilecapsphp"></a>
<div class="addfile"><h4>Added: trunk/bp-xprofile/bp-xprofile-caps.php (0 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-caps.php                                (rev 0)
+++ trunk/bp-xprofile/bp-xprofile-caps.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+&lt;?php
+
+/**
+ * Roles and capabilities logic for the XProfile component
+ *
+ * @package BuddyPress
+ * @since 1.6
+ */
+
+/**
+ * Maps XProfile caps to built in WordPress caps
+ *
+ * @since 1.6
+ *
+ * @param array $caps Capabilities for meta capability
+ * @param string $cap Capability name
+ * @param int $user_id User id
+ * @param mixed $args Arguments
+ * @uses get_post() To get the post
+ * @uses get_post_type_object() To get the post type object
+ * @uses apply_filters() Calls 'bp_map_meta_caps' with caps, cap, user id and
+ *                        args
+ * @return array Actual capabilities for meta capability
+ */
+function bp_xprofile_map_meta_caps( $caps, $cap, $user_id, $args ) {
+        switch ( $cap ) {
+                case 'bp_xprofile_change_field_visibility' :
+                        $caps = array( 'read' );
+                        
+                        // You may pass args manually: $field_id, $profile_user_id
+                        $field_id          = isset( $args[0] ) ? (int)$args[0] : bp_get_the_profile_field_id();
+                        $profile_user_id = isset( $args[1] ) ? (int)$args[1] : bp_displayed_user_id();
+                        
+                        // Visibility on the fullname field is not editable
+                        if ( 1 == $field_id ) {
+                                $caps[] = 'do_not_allow';
+                                break;
+                        }
+                        
+                        // Has the admin disabled visibility modification for this field?
+                        if ( 'disabled' == bp_xprofile_get_meta( $field_id, 'field', 'allow_custom_visibility' ) ) {
+                                $caps[] = 'do_not_allow';
+                                break;
+                        }
+
+                        // Friends don't let friends edit each other's visibility
+                        // @todo - This would be a proper map if we used CPTs?
+                        if ( $profile_user_id != bp_displayed_user_id() &amp;&amp; !bp_current_user_can( 'bp_moderate' ) ) {
+                                $caps[] = 'do_not_allow'; 
+                                break;
+                        }
+
+                        break;
+        }
+        
+        return apply_filters( 'bp_xprofile_map_meta_caps', $caps, $cap, $user_id, $args );
+}
+add_filter( 'bp_map_meta_caps', 'bp_xprofile_map_meta_caps', 10, 4 );
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-classes.php (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-classes.php        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-xprofile/bp-xprofile-classes.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -283,7 +283,13 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         /**
</span><del>-         * Fetch the field visibility level for the returned fielddata
</del><ins>+         * Fetch the field visibility level for the fields returned by the query
+         *
+         * @since 1.6
+         *
+         * @param int $user_id The profile owner's user_id
+         * @param array $fields The database results returned by the get() query
+         * @return array $fields The database results, with field_visibility added
</ins><span class="cx">          */
</span><span class="cx">         function fetch_visibility_level( $user_id, $fields ) {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="lines">@@ -291,18 +297,19 @@
</span><span class="cx">                 // Get the user's visibility level preferences
</span><span class="cx">                 $visibility_levels = bp_get_user_meta( $user_id, 'bp_xprofile_visibility_levels', true );
</span><span class="cx">                 
</span><ins>+                // Get the admin-set preferences
+                $admin_set_levels  = self::fetch_default_visibility_levels();
+                
</ins><span class="cx">                 foreach( (array)$fields as $key =&gt; $field ) {
</span><ins>+                        // Does the admin allow this field to be customized?
+                        $allow_custom = !empty( $admin_set_levels[$field-&gt;id]['allow_custom'] ) &amp;&amp; 'disabled' != $admin_set_levels[$field-&gt;id]['allow_custom'];
+                        
</ins><span class="cx">                         // Look to see if the user has set the visibility for this field
</span><del>-                        if ( isset( $visibility_levels[$field-&gt;id] ) ) {
</del><ins>+                        if ( $allow_custom &amp;&amp; isset( $visibility_levels[$field-&gt;id] ) ) {
</ins><span class="cx">                                 $field_visibility = $visibility_levels[$field-&gt;id];
</span><del>-                        } else {
-                                // If not, bring up the admin-set defaults
-                                if ( !isset( $default_visibility_levels ) ) {
-                                        $default_visibility_levels = self::fetch_default_visibility_levels();
-                                }
-                                
</del><ins>+                        } else {                                
</ins><span class="cx">                                 // If no admin-set default is saved, fall back on a global default
</span><del>-                                $field_visibility = !empty( $default_visibility_levels[$field-&gt;id] ) ? $default_visibility_levels[$field-&gt;id] : apply_filters( 'bp_xprofile_default_visibility_level', 'public' );
</del><ins>+                                $field_visibility = !empty( $admin_set_levels[$field-&gt;id]['default'] ) ? $admin_set_levels[$field-&gt;id]['default'] : apply_filters( 'bp_xprofile_default_visibility_level', 'public' );
</ins><span class="cx">                         }
</span><span class="cx">                         
</span><span class="cx">                         $fields[$key]-&gt;visibility_level = $field_visibility;
</span><span class="lines">@@ -312,17 +319,26 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         /**
</span><del>-         * Fetch the admin-set default visibility levels for all fields
</del><ins>+         * Fetch the admin-set preferences for all fields
+         *
+         * @since 1.6
+         *
+         * @return array $default_visibility_levels An array, keyed by field_id, of default
+         *   visibility level + allow_custom (whether the admin allows this field to be set by user)
</ins><span class="cx">          */
</span><span class="cx">         function fetch_default_visibility_levels() {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">                 
</span><del>-                $levels = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT object_id, meta_value FROM {$bp-&gt;profile-&gt;table_name_meta} WHERE object_type = 'field' AND meta_key = 'default_visibility'&quot; ) );
</del><ins>+                $levels = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT object_id, meta_key, meta_value FROM {$bp-&gt;profile-&gt;table_name_meta} WHERE object_type = 'field' AND ( meta_key = 'default_visibility' OR meta_key = 'allow_custom_visibility' )&quot; ) );
</ins><span class="cx">                 
</span><span class="cx">                 // Arrange so that the field id is the key and the visibility level the value
</span><span class="cx">                 $default_visibility_levels = array();
</span><span class="cx">                 foreach( $levels as $level ) {
</span><del>-                        $default_visibility_levels[$level-&gt;object_id] = $level-&gt;meta_value;
</del><ins>+                        if ( 'default_visibility' == $level-&gt;meta_key ) {
+                                $default_visibility_levels[$level-&gt;object_id]['default'] = $level-&gt;meta_value;                
+                        } else if ( 'allow_custom_visibility' == $level-&gt;meta_key ) {
+                                $default_visibility_levels[$level-&gt;object_id]['allow_custom'] = $level-&gt;meta_value;                
+                        }
</ins><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 return $default_visibility_levels;
</span><span class="lines">@@ -408,6 +424,7 @@
</span><span class="cx">         var $order_by;
</span><span class="cx">         var $is_default_option;
</span><span class="cx">         var $default_visibility;
</span><ins>+        var $allow_custom_visibility;
</ins><span class="cx"> 
</span><span class="cx">         var $data;
</span><span class="cx">         var $message = null;
</span><span class="lines">@@ -451,6 +468,8 @@
</span><span class="cx">                         if ( empty( $this-&gt;default_visibility ) ) {
</span><span class="cx">                                 $this-&gt;default_visibility = 'public';
</span><span class="cx">                         }
</span><ins>+                        
+                        $this-&gt;allow_custom_visibility = 'disabled' == bp_xprofile_get_meta( $id, 'field', 'allow_custom_visibility' ) ? 'disabled' : 'allowed';
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -866,14 +885,24 @@
</span><span class="cx">                                         &lt;?php if ( 1 != $this-&gt;id ) : ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;div id=&quot;titlediv&quot;&gt;
</span><del>-                                                        &lt;h3&gt;&lt;label for=&quot;default-visibility&quot;&gt;&lt;?php _e( &quot;Default Visibility Level&quot;, 'buddypress' ); ?&gt;&lt;/label&gt;&lt;/h3&gt;
</del><ins>+                                                        
</ins><span class="cx">                                                         &lt;div id=&quot;titlewrap&quot;&gt;
</span><ins>+                                                                &lt;h3&gt;&lt;label for=&quot;default-visibility&quot;&gt;&lt;?php _e( &quot;Default Visibility&quot;, 'buddypress' ); ?&gt;&lt;/label&gt;&lt;/h3&gt;
</ins><span class="cx">                                                                 &lt;ul&gt;
</span><span class="cx">                                                                 &lt;?php foreach( bp_xprofile_get_visibility_levels() as $level ) : ?&gt;
</span><span class="cx">                                                                         &lt;li&gt;&lt;input type=&quot;radio&quot; name=&quot;default-visibility&quot; value=&quot;&lt;?php echo esc_attr( $level['id'] ) ?&gt;&quot; &lt;?php checked( $this-&gt;default_visibility, $level['id'] ) ?&gt;&gt; &lt;?php echo esc_html( $level['label'] ) ?&gt;&lt;/li&gt; 
</span><span class="cx">                                                                 &lt;?php endforeach ?&gt;
</span><span class="cx">                                                                 &lt;/ul&gt;
</span><span class="cx">                                                         &lt;/div&gt;
</span><ins>+                                                        
+                                                        &lt;div id=&quot;titlewrap&quot;&gt;
+                                                                &lt;h3&gt;&lt;label for=&quot;allow-custom-visibility&quot;&gt;&lt;?php _e( &quot;Per-Member Visibility&quot;, 'buddypress' ); ?&gt;&lt;/label&gt;&lt;/h3&gt;
+                                                                &lt;ul&gt;
+                                                                        &lt;li&gt;&lt;input type=&quot;radio&quot; name=&quot;allow-custom-visibility&quot; value=&quot;allowed&quot; &lt;?php checked( $this-&gt;allow_custom_visibility, 'allowed' ) ?&gt;&gt; &lt;?php _e( &quot;Let members change the this field's visibility&quot;, 'buddypress' ) ?&gt;&lt;/li&gt;
+                                                                        
+                                                                        &lt;li&gt;&lt;input type=&quot;radio&quot; name=&quot;allow-custom-visibility&quot; value=&quot;disabled&quot; &lt;?php checked( $this-&gt;allow_custom_visibility, 'disabled' ) ?&gt;&gt; &lt;?php _e( 'Enforce the default visibility for all members', 'buddypress' ) ?&gt;&lt;/li&gt;
+                                                                &lt;/ul&gt;
+                                                        &lt;/div&gt;
</ins><span class="cx">                                                 &lt;/div&gt;
</span><span class="cx">                                         
</span><span class="cx">                                         &lt;?php endif ?&gt;
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofilefiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-filters.php (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-filters.php        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-xprofile/bp-xprofile-filters.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -211,4 +211,6 @@
</span><span class="cx"> }
</span><span class="cx"> add_filter( 'comments_array', 'xprofile_filter_comments', 10, 2 );
</span><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> ?&gt;
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-loader.php (5796 => 5797)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-loader.php        2012-02-16 13:40:18 UTC (rev 5796)
+++ trunk/bp-xprofile/bp-xprofile-loader.php        2012-02-16 22:07:10 UTC (rev 5797)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx">                         'actions',
</span><span class="cx">                         'activity',
</span><span class="cx">                         'screens',
</span><ins>+                        'caps',
</ins><span class="cx">                         'classes',
</span><span class="cx">                         'filters',
</span><span class="cx">                         'template',
</span></span></pre>
</div>
</div>

</body>
</html>