function conditional_fields_features_rebuild in Conditional Fields 6.2
Same name and namespace in other branches
- 7.3 includes/conditional_fields.features.inc \conditional_fields_features_rebuild()
Implmentation of hook_features_rebuild()
1 call to conditional_fields_features_rebuild()
- conditional_fields_features_revert in includes/
conditional_fields.features.inc - Implementation of hook_features_revert().
File
- includes/
conditional_fields.features.inc, line 50
Code
function conditional_fields_features_rebuild($module) {
$defaults = module_invoke($module, 'conditional_fields_default_fields');
if (!empty($defaults)) {
$types = array();
foreach ($defaults as $field) {
if (!in_array($field['type'], $types)) {
$types[] = $field['type'];
db_query("DELETE FROM {conditional_fields} WHERE type='%s'", $field['type']);
}
conditional_fields_insert_field($field['type'], $field['field_name'], $field['control_field_name'], $field['trigger_values']);
}
}
}