acf_get_field_types_info()ACF 5.6.9

acf_get_field_types_info

Returns an array containing information about each field type

Хуков нет.

Возвращает

type. Description.

Использование

acf_get_field_types_info( $args );
$args **
-
По умолчанию: array()

Список изменений

С версии 5.6.9 Введена.

Код acf_get_field_types_info() ACF 6.0.4

function acf_get_field_types_info( $args = array() ) {

	// vars
	$data        = array();
	$field_types = acf_get_field_types();

	// loop
	foreach ( $field_types as $type ) {
		$data[ $type->name ] = array(
			'label'    => $type->label,
			'name'     => $type->name,
			'category' => $type->category,
			'public'   => $type->public,
		);
	}

	// return
	return $data;
}