You are here

function brightcove_content_migrate_instance_alter in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.6 brightcove.module \brightcove_content_migrate_instance_alter()

Implements hook_content_migrate_instance_alter().

File

./brightcove.module, line 1476
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function brightcove_content_migrate_instance_alter(&$instance_value, $field_value) {
  switch ($field_value['type']) {
    case 'brightcove_field':
      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;
  }
}