function ctools_fields_get_fields_by_type
Returns a list of field definitions of a specified type.
Parameters
string $field_type: A field type name; e.g. 'text' or 'date'.
Return value
array An array of field definitions of the specified type, keyed by field name.
File
-
includes/
fields.inc, line 320
Code
function ctools_fields_get_fields_by_type($field_type) {
$fields = array();
foreach (field_info_fields() as $field_name => $field_info) {
if ($field_info['type'] == $field_type) {
$fields[$field_name] = $field_info;
}
}
return $fields;
}