acf_get_field_types_info()
acf_get_field_types_info
Returns an array containing information about each field type
No Hooks.
Returns
type. Description.
Usage
acf_get_field_types_info( $args );
- $args
- .
Default:array()
Changelog
| Since 5.6.9 | Introduced. |
acf_get_field_types_info() acf get field types info code ACF 6.8.8
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_filter(
array(
'label' => $type->label,
'name' => $type->name,
'description' => $type->description,
'category' => $type->category,
'public' => $type->public,
'doc_url' => $type->doc_url,
'tutorial_url' => $type->tutorial_url,
'preview_image' => $type->preview_image,
'pro' => $type->pro,
)
);
}
// return
return $data;
}