' . t('About') . ''; $output .= '

' . t('The E-mail module allows you to create fields that contain e-mail addresses. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the E-mail module.', array('@field' => url('admin/help/field'), '@field_ui' => url('admin/help/field_ui'), '@email_documentation' => 'https://drupal.org/documentation/modules/email')) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing and displaying email fields') . '
'; $output .= '
' . t('The settings and the display of the email field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('@field_ui' => url('admin/help/field_ui'))) . '
'; $output .= '
' . t('Displaying e-mail addresses as links') . '
'; $output .= '
' . t('E-mail addresses can be displayed as plain text or as links by choosing the appropriate display format.') . '
'; $output .= '
' . t('Validating E-mail addresses') . '
'; $output .= '
' . t('E-mail addresses are validated when the content is saved.') . '
'; $output .= '
'; return $output; } } /** * Implements hook_field_info_alter(). */ function email_field_info_alter(&$info) { if (\Drupal::moduleHandler()->moduleExists('text')) { $info['email']['default_formatter'] = 'text_plain'; } } /** * Implements hook_field_formatter_info_alter(). */ function email_field_formatter_info_alter(&$info) { if (isset($info['text_plain'])) { $info['text_plain']['field_types'][] = 'email'; } }