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

	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

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.