You are here

function theme_search_api_glossary_facetapi_link_active in Search API AZ Glossary 7

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 string reference to 'theme_search_api_glossary_facetapi_link_active'
search_api_glossary_theme_registry_alter in ./search_api_glossary.module
Implements hook_theme_registry_alter().

File

./search_api_glossary.theme.inc, line 52

Code

function theme_search_api_glossary_facetapi_link_active($variables) {

  // Theme function variables fro accessible markup.
  // @see http://drupal.org/node/1316580
  $accessible_vars = array(
    'text' => $variables['text'],
    'active' => TRUE,
  );
  $accessible_markup = theme('facetapi_accessible_markup', $accessible_vars);

  // Sanitizes the link text if necessary.
  $sanitize = empty($variables['options']['html']);
  $variables['text'] = $sanitize ? check_plain($variables['text']) : $variables['text'];
  $variables['text'] .= $accessible_markup;
  $variables['options']['html'] = TRUE;
  return $variables['text'];
}