I am trying to override the 'link_field' theme function in the Link module. I've put this function in my template.php of my active theme and have cleared the cache, but its not overriding. What am I doing wrong?
function tma_corp_link_field($vars) {
dpm($vars);
drupal_add_css(drupal_get_path('module', 'link') . '/link.css');
$element = $vars['element'];
// Prefix single value link fields with the name of the field.
if (empty($element['#field']['multiple'])) {
if (isset($element['url']) && !isset($element['title'])) {
$element['url']['#title_display'] = 'invisible';
}
}
$output = '';
$output .= '<div class="link-field-subrow clearfix">';
if (isset($element['title'])) {
$output .= '<div class="link-field-title link-field-column">' . drupal_render($element['title']) . '</div>';
}
$output .= '<div class="link-field-url' . (isset($element['title']) ? ' link-field-column' : '') . '">' . drupal_render($element['url']) . '</div>';
$output .= '</div>';
if (!empty($element['attributes']['target'])) {
$output .= '<div class="link-attributes">' . drupal_render($element['attributes']['target']) . '</div>';
}
if (!empty($element['attributes']['title'])) {
$output .= '<div class="link-attributes">' . drupal_render($element['attributes']['title']) . '</div>';
}
if (!empty($element['attributes']['class'])) {
$output .= '<div class="link-attributes">' . drupal_render($element['attributes']['class']) . '</div>';
}
dpm($element);
return $output;
}