I am trying to change the markup of links created by the facetapi module. The theme function is here
function theme_facetapi_link_inactive($variables) {
$accessible_vars = array(
'text' => $variables['text'],
'active' => FALSE,
);
$accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
$sanitize = empty($variables['options']['html']);
$variables['text'] = ($sanitize) ? check_plain($variables['text']) : $variables['text'];
if (isset($variables['count'])) {
$variables['text'] .= ' ' . theme('facetapi_count', $variables);
}
$variables['text'] .= $accessible_markup;
$variables['options']['html'] = TRUE;
return theme_link($variables);
}
I am trying to override this function so I can change the markup without editing the module files. I've tried MYTHEME_preprocess_facetapi_link_inactive and using a custom module but both times I can print the variables and they are correct but the links are still displayed wrong.
function MYTHEME_preprocess_facetapi_link_inactive($variables) {
$accessible_vars = array(
'text' => $variables['text'],
'active' => FALSE,
);
$accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);
$sanitize = empty($variables['options']['html']);
$variables['text'] = ($sanitize) ? check_plain($variables['text']) : $variables['text'];
if (isset($variables['count'])) {
$variables['text'] .= ' <strong>' . theme('facetapi_count', $variables) . '!!!</strong>';
}
$variables['text'] .= $accessible_markup;
$variables['options']['html'] = TRUE;
return theme_link($variables);
}
Am I going about this the wrong way?