BP_XProfile_Field::get_allow_custom_visibility()
Get whether the field’s default visibility can be overridden by users.
Description
Lazy-loaded to reduce overhead.
Defaults to ‘allowed’.
Return
(string) 'disabled' or 'allowed'.
Source
File: bp-xprofile/classes/class-bp-xprofile-field.php
880 881 882 883 884 885 886 887 888 889 890 891 892 | public function get_allow_custom_visibility() { if ( ! isset( $this ->allow_custom_visibility ) ) { $allow_custom_visibility = bp_xprofile_get_meta( $this ->id, 'field' , 'allow_custom_visibility' ); if ( 'disabled' === $allow_custom_visibility ) { $this ->allow_custom_visibility = 'disabled' ; } else { $this ->allow_custom_visibility = 'allowed' ; } } return $this ->allow_custom_visibility; } |
Changelog
Version | Description |
---|---|
BuddyPress 4.4.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.