This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_XProfile_Field::visibility_metabox()

Private method used to output field visibility metaboxes.

Description

Return

(void) If default field id 1.

Source

File: bp-xprofile/classes/class-bp-xprofile-field.php

1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
private function visibility_metabox() {
    ?>
 
    <div class="postbox">
        <h2><label for="default-visibility"><?php esc_html_e( 'Visibility', 'buddyboss' ); ?></label></h2>
        <div class="inside">
            <div>
                <select name="default-visibility" id="default-visibility">
 
                    <?php foreach ( bp_xprofile_get_visibility_levels() as $level ) : ?>
 
                        <option value="<?php echo esc_attr( $level['id'] ); ?>" <?php selected( $this->get_default_visibility(), $level['id'] ); ?>>
                            <?php echo esc_html( $level['label'] ); ?>
                        </option>
 
                    <?php endforeach ?>
 
                </select>
            </div>
 
            <div>
                <ul>
                    <li>
                        <input type="radio" id="allow-custom-visibility-allowed" name="allow-custom-visibility"
                               value="allowed" <?php checked( $this->get_allow_custom_visibility(), 'allowed' ); ?> />
                        <label for="allow-custom-visibility-allowed"><?php esc_html_e( 'Allow members to override', 'buddyboss' ); ?></label>
                    </li>
                    <li>
                        <input type="radio" id="allow-custom-visibility-disabled" name="allow-custom-visibility"
                               value="disabled" <?php checked( $this->get_allow_custom_visibility(), 'disabled' ); ?> />
                        <label for="allow-custom-visibility-disabled"><?php esc_html_e( 'Enforce field visibility', 'buddyboss' ); ?></label>
                    </li>
                </ul>
            </div>
        </div>
    </div>
 
    <?php
}

Changelog

Changelog
Version Description
BuddyPress 2.3.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.