BP_XProfile_Field::get_default_visibility()
Get the field’s default visibility setting.
Description
Lazy-loaded to reduce overhead.
Defaults to ‘public’ if no visibility setting is found in the database.
Return
(string)
Source
File: bp-xprofile/classes/class-bp-xprofile-field.php
public function get_default_visibility() {
if ( ! isset( $this->default_visibility ) ) {
$this->default_visibility = bp_xprofile_get_meta( $this->id, 'field', 'default_visibility' );
if ( ! $this->default_visibility ) {
$this->default_visibility = 'public';
}
}
return $this->default_visibility;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.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.