bp_xprofile_get_field_types()

Get details of all xprofile field types.


Return Return

(array) Key/value pairs (field type => class name).


Source Source

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

function bp_xprofile_get_field_types() {
	$fields = array(
		'checkbox'            => 'BP_XProfile_Field_Type_Checkbox',
		'datebox'             => 'BP_XProfile_Field_Type_Datebox',
		'multiselectbox'      => 'BP_XProfile_Field_Type_Multiselectbox',
		'number'              => 'BP_XProfile_Field_Type_Number',
		'url'                 => 'BP_XProfile_Field_Type_URL',
		'radio'               => 'BP_XProfile_Field_Type_Radiobutton',
		'selectbox'           => 'BP_XProfile_Field_Type_Selectbox',
		'textarea'            => 'BP_XProfile_Field_Type_Textarea',
		'textbox'             => 'BP_XProfile_Field_Type_Textbox',
		'telephone'           => 'BP_XProfile_Field_Type_Telephone',
		'wp-biography'        => 'BP_XProfile_Field_Type_WordPress_Biography',
		'wp-textbox'          => 'BP_XProfile_Field_Type_WordPress_Textbox',
		'checkbox_acceptance' => 'BP_XProfile_Field_Type_Checkbox_Acceptance',
	);

	/**
	 * Filters the list of all xprofile field types.
	 *
	 * If you've added a custom field type in a plugin, register it with this filter.
	 *
	 * @since 2.0.0
	 *
	 * @param array $fields Array of field type/class name pairings.
	 */
	return apply_filters( 'bp_xprofile_get_field_types', $fields );
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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