function access_update_7101 in Access Control Kit 7
Switch access fields to buttons widget.
File
- ./
access.install, line 216 - Install, update and uninstall functions for the access control kit module.
Code
function access_update_7101() {
foreach (access_scheme_load_multiple() as $scheme) {
$field_name = $scheme->realm_field['field_name'];
$instance = field_info_instance('access_grant', $field_name, $scheme->machine_name);
if (!empty($instance) && $instance['widget']['type'] == 'options_select') {
$instance['widget']['type'] = 'options_buttons';
field_update_instance($instance);
}
}
}