Loop all content type field

  $contentinfo = node_type_get_types();
  foreach ($contentinfo as $content_type) {
    $field_instances = field_info_instances('node', $content_type->type);
    $allow_field = array();
    foreach ($field_instances as $field) {
      if ($field['widget']['module'] == 'image' || $field['widget']['module'] == 'file') {
        $allow_field[$field['field_id']] = t($field['field_name']);
      }
    }
    //.................................
   }
Help Share this Article