bp_xprofile_get_field_type( int $field_id )

Get a profile Field Type object.


Parameters Parameters

$field_id

(int) (Required) ID of the field.


Top ↑

Return Return

(BP_XProfile_Field_Type|null) Field Type object if found, otherwise null.


Source Source

File: bp-xprofile/bp-xprofile-functions.php

function bp_xprofile_get_field_type( $field_id ) {
	$field_type = null;
	$field      = xprofile_get_field( $field_id, null, false );

	if ( $field instanceof BP_XProfile_Field ) {
		$field_type = $field->type_obj;
	}

	return $field_type;
}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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