You are here

function phonefield_i18n_string_list_field_alter in Phone Field 7

Implements hook_i18n_string_list_TEXTGROUP_alter().

File

./phonefield.module, line 545
Hooks for a module that defines a simple phone number field type.

Code

function phonefield_i18n_string_list_field_alter(&$strings, $type = NULL, $object = NULL) {
  if ($type != 'field_instance' || !is_array($object) || !isset($object['widget']['type'])) {
    return;
  }
  if ($object['widget']['type'] == 'phonefield_field' && isset($object['settings']['linkvalue'])) {
    $strings['field'][$object['field_name']][$object['bundle']]['linkvalue']['string'] = $object['settings']['linkvalue'];
  }
}