--- link.module 2010-03-01 03:13:00.000000000 +0200 +++ link.title.module 2010-04-02 15:02:09.000000000 +0300 @@ -451,6 +451,9 @@ function link_theme() { 'link_formatter_default' => array( 'arguments' => array('element' => NULL), ), + 'link_formatter_title_plain' => array( + 'arguments' => array('element' => NULL), + ), 'link_formatter_plain' => array( 'arguments' => array('element' => NULL), ), @@ -580,6 +583,11 @@ function link_field_formatter_info() { 'field types' => array('link'), 'multiple values' => CONTENT_HANDLE_CORE, ), + 'title_plain' => array( + 'label' => t('Title, as plain text'), + 'field types' => array('link'), + 'multiple values' => CONTENT_HANDLE_CORE, + ), 'url' => array( 'label' => t('URL, as link'), 'field types' => array('link'), @@ -623,6 +631,13 @@ function theme_link_formatter_default($e } /** + * Theme function for 'title_plain' text field formatter. + */ +function theme_link_formatter_title_plain($element) { + return empty($element['#item']['title']) ? '' : check_plain($element['#item']['title']); +} + +/** * Theme function for 'plain' text field formatter. */ function theme_link_formatter_plain($element) {