function theme_current_search_text in Facet API 6.3
Same name and namespace in other branches
- 7.2 contrib/current_search/current_search.theme.inc \theme_current_search_text()
- 7 contrib/current_search/current_search.theme.inc \theme_current_search_text()
Returns HTML for the inactive facet item's count.
Parameters
$variables: An associative array containing:
- text: The text being displayed.
- wrapper: A boolean flagging whether wrapper markup should be added.
- element: The HTML element the text is wrapped in.
- css: A boolean flagging whether a CSS class should be added to the wrapper element.
- class: An array of CSS classes.
- options: An associative array of options containing:
- html: Whether or not "text" is rendered HTML, otherwise the string is passed through check_plain(). Defaults to FALSE.
1 theme call to theme_current_search_text()
- CurrentSearchItemText::execute in contrib/
current_search/ plugins/ current_search/ item_text.inc - Implements CurrentSearchItem::execute().
File
- contrib/
current_search/ current_search.theme.inc, line 25 - Theme functions for the Current Search Blocks module.
Code
function theme_current_search_text(array $variables) {
// Initializes output, sanitizes text if necessary.
$sanitize = empty($variables['options']['html']);
$output = $sanitize ? check_plain($variables['text']) : $variables['text'];
// Adds wrapper markup and CSS classes.
if ($variables['wrapper'] && $variables['element']) {
$attributes = array(
'class' => $variables['class'],
);
$element = check_plain($variables['element']);
$output = '<' . $element . drupal_attributes($attributes) . '>' . $output . '</' . $element . '>';
}
return $output;
}