function text_noderef_content_migrate_field_alter in Text or Nodereference 7
Implements hook_content_migrate_field_alter().
See also
http://drupal.org/node/1417626
File
- ./
text_noderef.module, line 309 - Text or nodereference field formatter for a text field and autocomplete widget.
Code
function text_noderef_content_migrate_field_alter(&$field_value, $instance_value) {
if ($field_value['type'] == 'text' && $instance_value['widget']['type'] == 'text_noderef_textfield' && empty($field_value['settings']['max_length'])) {
// $field_value['type'] must not be changed, because our widget and field
// formatter are kicking in only for these. OTOH, a max_length must be
// defined for 'simple' text fields, so we must follow this way: let's
// define a 'high enough' (TM) value for this.
$field_value['settings']['max_length'] = 999;
}
}