Reputation: 38142
I want to list all content types (not nodes) that have a special field for example "field_user_select". How do I do this programmatically in drupal 7?
Thanks
Upvotes: 2
Views: 1437
Reputation: 6891
You should be able to use field_read_instances to return all field instances of a given field_name. From that, get the entity bundles.
Upvotes: 3
Reputation: 5128
I didn't found correct function, but you can create own function, take code from function field_ui_fields_list() in field_ui.admin.inc file, add argument for filtering by field name...
Upvotes: 1