global $field and bp_get_the_profile_field_visibility_level()
Hello again 🙂
When the visitor is NOT logged in the global $field does not have the $field->visibility_level property. But it is there when the visitor is logged in.
The issue is, when there’s no property, the default is ‘public’. Per a look at bp-xprofile-template.php.
1) Why is the property MIA?
2) Even so, when in doubt I would think not-public should be the default.
Again, this project I’m doing is using custom visibility values. That’s actually going well, sans some new functions and such. What threw me a curveball is the $field global have two states. Maybe you can suggest a different way to get the field_visibility in the profile view loop?
- The topic ‘global $field and bp_get_the_profile_field_visibility_level()’ is closed to new replies.