<!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][9686] trunk/src/bp-xprofile/bp-xprofile-template.php: XProfile: Refactor `bp_has_profile()` stack to support passing arguments as associative arrays.</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/9686">9686</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/9686","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnjamesjacoby</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-04-03 16:22:14 +0000 (Fri, 03 Apr 2015)</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'>XProfile: Refactor `bp_has_profile()` stack to support passing arguments as associative arrays.
* Maintains backward compatibility by parsing old-style parameters using `bp_core_parse_args_array()`, converting to new-style array, and throwing `_deprecated_argument()` error when old-style is used
* Changes calls to `BP_XProfile_Data_Template::__construct()` to use the new format
* Hat-tip boonebgorges for similar work to other components previously.
See <a href="http://buddypress.trac.wordpress.org/ticket/6347">#6347</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpxprofilebpxprofiletemplatephp">trunk/src/bp-xprofile/bp-xprofile-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpxprofilebpxprofiletemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-xprofile/bp-xprofile-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-xprofile/bp-xprofile-template.php 2015-04-03 15:49:35 UTC (rev 9685)
+++ trunk/src/bp-xprofile/bp-xprofile-template.php 2015-04-03 16:22:14 UTC (rev 9686)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,6 +11,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> defined( 'ABSPATH' ) || exit;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> class BP_XProfile_Data_Template {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * The loop iterator.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -101,38 +102,83 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public $user_id;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function __construct( $user_id, $profile_group_id, $hide_empty_groups = false, $fetch_fields = false, $fetch_field_data = false, $exclude_groups = false, $exclude_fields = false, $hide_empty_fields = false, $fetch_visibility_level = false, $update_meta_cache = true ) {
- $this->groups = bp_xprofile_get_groups( array(
- 'profile_group_id' => $profile_group_id,
- 'user_id' => $user_id,
- 'hide_empty_groups' => $hide_empty_groups,
- 'hide_empty_fields' => $hide_empty_fields,
- 'fetch_fields' => $fetch_fields,
- 'fetch_field_data' => $fetch_field_data,
- 'fetch_visibility_level' => $fetch_visibility_level,
- 'exclude_groups' => $exclude_groups,
- 'exclude_fields' => $exclude_fields,
- 'update_meta_cache' => $update_meta_cache,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Get activity items, as specified by parameters
+ *
+ * @param array $args {
+ * An array of arguments. All items are optional.
+ *
+ * @type int $user_id Fetch field data for this user ID
+ * @type int $profile_group_id Field group to fetch fields & data for
+ * @type int|bool $hide_empty_groups Should empty field groups be skipped
+ * @type int|bool $fetch_fields Fetch fields for field group
+ * @type int|bool $fetch_field_data Fetch field data for fields in group
+ * @type array $exclude_groups Exclude these field groups
+ * @type array $exclude_fields Exclude these fields
+ * @type int|bool $hide_empty_fields Should empty fields be skipped
+ * @type int|bool $fetch_visibility_level Fetch visibility levels
+ * @type int|bool $update_meta_cache Should metadata cache be updated
+ * }
+ * @return array The array returned has two keys:
+ * - 'total' is the count of located activities
+ * - 'activities' is an array of the located activities
+ */
+ public function __construct( $args = '' ) {
+
+ // Backward compatibility with old method of passing arguments
+ if ( ! is_array( $args ) || func_num_args() > 1 ) {
+ _deprecated_argument( __METHOD__, '2.3.0', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );
+
+ $old_args_keys = array(
+ 0 => 'user_id',
+ 1 => 'profile_group_id',
+ 2 => 'hide_empty_groups',
+ 3 => 'fetch_fields',
+ 4 => 'fetch_field_data',
+ 5 => 'exclude_groups',
+ 6 => 'exclude_fields',
+ 7 => 'hide_empty_fields',
+ 8 => 'fetch_visibility_level',
+ 9 => 'update_meta_cache'
+ );
+
+ $func_args = func_get_args();
+ $args = bp_core_parse_args_array( $old_args_keys, $func_args );
+ }
+
+ $r = wp_parse_args( $args, array(
+ 'profile_group_id' => false,
+ 'user_id' => false,
+ 'hide_empty_groups' => false,
+ 'hide_empty_fields' => false,
+ 'fetch_fields' => false,
+ 'fetch_field_data' => false,
+ 'fetch_visibility_level' => false,
+ 'exclude_groups' => false,
+ 'exclude_fields' => false,
+ 'update_meta_cache' => true
</ins><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">- $this->group_count = count($this->groups);
- $this->user_id = $user_id;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->groups = bp_xprofile_get_groups( $r );
+ $this->group_count = count( $this->groups );
+ $this->user_id = $r['user_id'];
</ins><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">- function has_groups() {
- if ( $this->group_count )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function has_groups() {
+ if ( ! empty( $this->group_count ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</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">- function next_group() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function next_group() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->current_group++;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->group = $this->groups[$this->current_group];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->group = $this->groups[ $this->current_group ];
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->field_count = 0;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if( ! empty( $this->group->fields ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $this->group->fields ) ) {
</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"> * Filters the group fields for the next_group method.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -149,14 +195,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->group;
</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">- function rewind_groups() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function rewind_groups() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->current_group = -1;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->group_count > 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->group = $this->groups[0];
</span><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">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function profile_groups() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function profile_groups() {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->current_group + 1 < $this->group_count ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( $this->current_group + 1 == $this->group_count ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -166,7 +212,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.1.0)
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action('xprofile_template_loop_end');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'xprofile_template_loop_end' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Do some cleaning up after the loop
</span><span class="cx" style="display: block; padding: 0 10px"> $this->rewind_groups();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -175,56 +222,56 @@
</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">- function the_profile_group() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function the_profile_group() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $group;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->in_the_loop = true;
</span><span class="cx" style="display: block; padding: 0 10px"> $group = $this->next_group();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 == $this->current_group ) // loop has just started
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // loop has just started
+ if ( 0 === $this->current_group ) {
</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"> * Fires if the current group is the first in the loop.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since BuddyPress (1.1.0)
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_action('xprofile_template_loop_start');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ do_action( 'xprofile_template_loop_start' );
+ }
</ins><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">- /**** FIELDS ****/
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /** Fields ****************************************************************/
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function next_field() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function next_field() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->current_field++;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->field = $this->group->fields[$this->current_field];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->field = $this->group->fields[ $this->current_field ];
+
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->field;
</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">- function rewind_fields() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function rewind_fields() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->current_field = -1;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->field_count > 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->field = $this->group->fields[0];
</span><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">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function has_fields() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function has_fields() {
</ins><span class="cx" style="display: block; padding: 0 10px"> $has_data = false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> for ( $i = 0, $count = count( $this->group->fields ); $i < $count; ++$i ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $field = &$this->group->fields[$i];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $field = &$this->group->fields[ $i ];
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !empty( $field->data ) && $field->data->value != null ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $field->data ) && ( $field->data->value != null ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $has_data = true;
</span><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">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $has_data )
- return true;
-
- return false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return $has_data;
</ins><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">- function profile_fields() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function profile_fields() {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->current_field + 1 < $this->field_count ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( $this->current_field + 1 == $this->field_count ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -235,19 +282,19 @@
</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">- function the_profile_field() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function the_profile_field() {
</ins><span class="cx" style="display: block; padding: 0 10px"> global $field;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $field = $this->next_field();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Valid field values of 0 or '0' get caught by empty(), so we have an extra check for these. See #BP5731
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $field->data ) && ( ! empty( $field->data->value ) || '0' == $field->data->value ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $field->data ) && ( ! empty( $field->data->value ) || ( '0' === $field->data->value ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = maybe_unserialize( $field->data->value );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = 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">- if ( ! empty( $value ) || '0' == $value ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $value ) || ( '0' === $value ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->field_has_data = true;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->field_has_data = false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -294,18 +341,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ), 'has_profile' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Populate the template loop global
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $profile_template = new BP_XProfile_Data_Template(
- $r['user_id'],
- $r['profile_group_id'],
- $r['hide_empty_groups'],
- $r['fetch_fields'],
- $r['fetch_field_data'],
- $r['exclude_groups'],
- $r['exclude_fields'],
- $r['hide_empty_fields'],
- $r['fetch_visibility_level'],
- $r['update_meta_cache']
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $profile_template = new BP_XProfile_Data_Template( $r );
</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"> * Filters whether or not a group has a profile to display.
</span></span></pre>
</div>
</div>
</body>
</html>