acf_get_grouped_field_types() │ ACF 5.0.0

Returns an multi-dimentional array of field types "name => label" grouped by category

Hooks from the function

Returns

array.

Usage

acf_get_grouped_field_types();

Changelog

Since 5.0.0 Introduced.

acf_get_grouped_field_types() code ACF 6.8.8

function acf_get_grouped_field_types() {

	// vars
	$types  = acf_get_field_types();
	$groups = array();
	$l10n   = acf_get_field_categories_i18n();

	// loop
	foreach ( $types as $type ) {

		// translate
		$cat = $type->category;
		$cat = isset( $l10n[ $cat ] ) ? $l10n[ $cat ] : $cat;

		// append
		$groups[ $cat ][ $type->name ] = $type->label;
	}

	// filter
	$groups = apply_filters( 'acf/get_field_types', $groups );

	// return
	return $groups;
}