xprofile_check_is_required_field( int $field_id )
Check if field is a required field.
Description
Parameters
- $field_id
-
(Required) ID of the field to check for.
Return
(bool) Whether or not field is required.
Source
File: bp-xprofile/bp-xprofile-functions.php
function xprofile_check_is_required_field( $field_id ) {
$field = new BP_XProfile_Field( $field_id );
$retval = false;
if ( isset( $field->is_required ) ) {
$retval = $field->is_required;
}
return (bool) $retval;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.1.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.