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

' . t('The E-mail module defines a field for storing e-mail addresses, for use with the Field module. E-mail addresses are validated to ensure they match the expected format. See the Field module help page for more information about fields.', array('@field-help' => url('admin/help/field'))) . '

'; return $output; } } /** * Implements hook_field_info(). */ function email_field_info() { return array( 'email' => array( 'label' => t('E-mail'), 'description' => t('This field stores an e-mail address in the database.'), 'default_widget' => 'email_default', 'default_formatter' => 'email_mailto', ), ); } /** * Implements hook_field_info_alter(). */ function email_field_info_alter(&$info) { if (module_exists('text')) { $info['email']['default_formatter'] = 'text_plain'; } } /** * Implements hook_field_is_empty(). */ function email_field_is_empty($item, $field) { return !isset($item['value']) || $item['value'] === ''; } /** * Implements hook_field_formatter_info_alter(). */ function email_field_formatter_info_alter(&$info) { if (isset($info['text_plain'])) { $info['text_plain']['field_types'][] = 'email'; } }