bp_get_the_profile_field_visibility_level()
Return the visibility level of this field.
Description
Return
(string)
Source
File: bp-xprofile/bp-xprofile-template.php
function bp_get_the_profile_field_visibility_level() { global $field; // On the registration page, values stored in POST should take // precedence over default visibility, so that submitted values // are not lost on failure. if ( bp_is_register_page() && ! empty( $_POST['field_' . $field->id . '_visibility'] ) ) { $retval = esc_attr( $_POST['field_' . $field->id . '_visibility'] ); } else { $retval = ! empty( $field->visibility_level ) ? $field->visibility_level : 'public'; } /** * Filters the profile field visibility level. * * @since BuddyPress 1.6.0 * * @param string $retval Field visibility level. */ return apply_filters( 'bp_get_the_profile_field_visibility_level', $retval ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.