function brightcove_field_content_migrate_instance_alter in Brightcove Video Connect 7.3
Same name and namespace in other branches
- 7.2 brightcove_field/brightcove_field.module \brightcove_field_content_migrate_instance_alter()
- 7.4 brightcove_field/brightcove_field.module \brightcove_field_content_migrate_instance_alter()
- 7.5 brightcove_field/brightcove_field.module \brightcove_field_content_migrate_instance_alter()
Implements hook_content_migrate_instance_alter().
File
- brightcove_field/
brightcove_field.module, line 1256 - Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function brightcove_field_content_migrate_instance_alter(&$instance_value, $field_value) {
switch ($field_value['type']) {
case 'brightcove_field':
$instance_value['settings']['allow_upload'] = $field_value['settings']['allow_upload'];
if ($instance_value['widget']['module'] == 'brightcove_cck') {
$instance_value['widget']['module'] = 'brightcove_field';
if (strpos($instance_value['widget']['type'], 'brightcove_cck') !== FALSE) {
$instance_value['widget']['type'] = str_replace('brightcove_cck', 'brightcove_field', $instance_value['widget']['type']);
}
}
break;
}
}