You are here

function fc_fc_instances_alter in Field Complete 7

Implements hook_fc_instances_alter().

Remove all fields that are deleted or specifically not intended to be included in completeness.

File

./fc.module, line 175
Field Complete - Provides field-based completeness for any entity.

Code

function fc_fc_instances_alter(&$instances, $entity_type, $entity, $options) {
  foreach ($instances as $field_name => $instance) {
    if (empty($instance['settings']['fc']['fc_include']) || !empty($instance['deleted'])) {
      $instances[$field_name]['settings']['fc']['disable'] = TRUE;
    }
  }
}