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::required_metabox()
Output the metabox for setting if field is required or not.
Description
Return
(void) If default field.
Source
File: bp-xprofile/classes/class-bp-xprofile-field.php
private function required_metabox() { // Default field is always required. if ( true === $this->is_default_field() ) { return; } ?> <div class="postbox"> <h2><label for="required"><?php esc_html_e( 'Requirement', 'buddyboss' ); ?></label></h2> <div class="inside"> <select name="required" id="required"> <option value="0"<?php selected( $this->is_required, '0' ); ?>><?php esc_html_e( 'Optional', 'buddyboss' ); ?></option> <option value="1"<?php selected( $this->is_required, '1' ); ?>><?php esc_html_e( 'Required', 'buddyboss' ); ?></option> </select> </div> </div> <?php }
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.