Alert: 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 Description
Return Return
(void) If default field or if the field does not support the feature.
Source Source
File: bp-xprofile/classes/class-bp-xprofile-field.php
private function visibility_metabox() { // Default field cannot have custom visibility. if ( true === $this->is_default_field() ) { return; } ?> <div class="postbox"> <h2><label for="default-visibility"><?php esc_html_e( 'Visibility', 'buddypress' ); ?></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', 'buddypress' ); ?></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', 'buddypress' ); ?></label> </li> </ul> </div> </div> </div> <?php }
Changelog Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |