function taxonomy_access_disable in Taxonomy Access Control 7
Same name and namespace in other branches
- 5.2 taxonomy_access.module \taxonomy_access_disable()
- 5 taxonomy_access.module \taxonomy_access_disable()
Implements hook_disable().
Removes all options_list callbacks during disabling of the module which were set in taxonomy_access_field_info_alter().
File
- ./
taxonomy_access.module, line 1766 - Allows administrators to specify access control for taxonomy categories.
Code
function taxonomy_access_disable() {
foreach (field_read_fields() as $field_name => $field) {
if ($field['type'] == 'taxonomy_term_reference') {
if (!empty($field['settings']['options_list_callback']) && $field['settings']['options_list_callback'] == '_taxonomy_access_term_options') {
$field['settings']['options_list_callback'] = '';
field_update_field($field);
}
}
}
}