Xprofile check if user can view field
I use the following code to get a custom BuddyPress Xprofile field:
<?php if($field = bp_get_profile_field_data('field=field_name')) : ?> <p><?php echo $field; ?></p> <?php endif; ?>
But how can I check if the current viewer has the permission to view the field (from the visibility setting who the user can set)?
(Is also asked this question on WordPress Answers but I didn’t get a answer there)
You must be logged in to reply to this topic.