function video_embed_field_update_7009 in Video Embed Field 7.2
Adds new Allowed Providers setting to existing instances.
File
- ./
video_embed_field.install, line 355 - Install, update and uninstall functions for the video_embed_field module.
Code
function video_embed_field_update_7009() {
$allowed_providers = array_keys(video_embed_get_handlers());
$instances = field_info_instances();
foreach ($instances as $entity_type) {
foreach ($entity_type as $bundle) {
foreach ($bundle as $instance) {
$field_info = field_info_field($instance['field_name']);
if ($field_info['type'] == 'video_embed_field') {
$instance['settings']['allowed_providers'] = $allowed_providers;
field_update_instance($instance);
}
}
}
}
return t('Updated default instance settings');
}