xprofile_check_is_required_field( int $field_id )

Check if field is a required field.


Parameters Parameters

$field_id

(int) (Required) ID of the field to check for.


Top ↑

Return Return

(bool) Whether or not field is required.


Source 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;
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.