BP 1.2 : problem with bp_profile_group_has_fields()
-
I used this code with BP 1.1.3 to retrieve the fields into my plugin admin options (bp-real-names).
I’m now trying to update it for BP 1.2; the problem is that the function bp_profile_group_has_fields() returns me false; I don’t understand why.
Any idea ?
Thanks !
if ( bp_has_profile() ) {
while ( bp_profile_groups() ) : bp_the_profile_group();
global $group;
$one_group = array();
$one_group[‘id’] = $group->id;
$one_group[‘name’] = $group->name;
$groups[ $group->id ] = $one_group;
print_r(“test”); //prints
if ( bp_profile_group_has_fields() ) {
print_r(“test2”); //do not print
while ( bp_profile_fields() ) : bp_the_profile_field();
if ( bp_field_has_data() ) {
global $field;
$one_field = array();
$one_field[‘id’] = $field->id;
$one_field[‘name’] = $field->name;
$fields[] = $one_field;
}
endwhile;
}
endwhile;
}
- The topic ‘BP 1.2 : problem with bp_profile_group_has_fields()’ is closed to new replies.