function theme_facetapi_link_active in Facet API 7.2
Same name and namespace in other branches
- 6.3 facetapi.theme.inc \theme_facetapi_link_active()
- 6 facetapi.theme.inc \theme_facetapi_link_active()
- 7 facetapi.theme.inc \theme_facetapi_link_active()
Returns HTML for an active facet item.
Parameters
$variables: An associative array containing the keys 'text', 'path', and 'options'. See the l() function for information about these variables.
See also
l()
1 theme call to theme_facetapi_link_active()
- CurrentSearchItemActive::execute in contrib/
current_search/ plugins/ current_search/ item_active.inc - Implements CurrentSearchItem::execute().
File
- ./
facetapi.theme.inc, line 94 - Theme functions for the Facet API module.
Code
function theme_facetapi_link_active($variables) {
// Sanitizes the link text if necessary.
$sanitize = empty($variables['options']['html']);
$link_text = $sanitize ? check_plain($variables['text']) : $variables['text'];
// Theme function variables fro accessible markup.
// @see http://drupal.org/node/1316580
$accessible_vars = array(
'text' => $variables['text'],
'active' => TRUE,
);
// Builds link, passes through t() which gives us the ability to change the
// position of the widget on a per-language basis.
$replacements = array(
'!facetapi_deactivate_widget' => theme('facetapi_deactivate_widget', $variables),
'!facetapi_accessible_markup' => theme('facetapi_accessible_markup', $accessible_vars),
);
$variables['text'] = t('!facetapi_deactivate_widget !facetapi_accessible_markup', $replacements);
$variables['options']['html'] = TRUE;
return theme_link($variables) . $link_text;
}