Look in (drumroll!) bp-xprofile.php, namely the xprofile_get_field_data() function which I think is what you need. Is that the kind of thing you were after?
Thanks DJPaul, I was really tired starying at that bp-xprofile.php and didn’t spot any of those handy functions. Thanks for pointing me back to that file. I ended using
xprofile_get_field_data() to save myself a step.
joelpittet
@joelpittet
15 years, 5 months ago
Would it be possible to add the wp comments to profiles?
Also, what is the easiest way to get xprofile field data?
I ended up doing something messy like this:
switch ($_SERVER[‘SERVER_NAME’]) {
case ‘localdomain.lh’:
$field_id = ‘1432’;
break;
default:
$field_id = ‘1678’;
break;
}
$field = new BP_XProfile_Field( $field_id, $user_id );
echo ($field->data->value);