You are here

function markup_i18n_string_list_field_alter in Markup 7

Implements hook_i18n_string_list_TEXTGROUP_alter().

File

./markup.module, line 159
Defines a field type for displaying markup on the node/edit form.

Code

function markup_i18n_string_list_field_alter(&$strings, $type = NULL, $object = NULL) {
  if ($type != 'field' || !is_array($object) || !isset($object['type'])) {
    return;
  }
  if ($object['type'] == 'markup' && isset($object['settings']['markup']['value'])) {
    $strings['field'][$object['field_name']]['#field']['markup']['string'] = $object['settings']['markup']['value'];
    $strings['field'][$object['field_name']]['#field']['markup']['title'] = t('Markup');
    $strings['field'][$object['field_name']]['#field']['markup']['format'] = $object['settings']['markup']['format'];
  }
}