function theme_uniqueness_widget in Uniqueness 6
Same name and namespace in other branches
- 7 uniqueness.module \theme_uniqueness_widget()
Theme function for the Uniqueness widget.
Note, some classes are required in the widget markup for Uniqueness to work. These classes begin with the appropriate word, 'uniquness'. Do not remove, or be sure to add them to your own theme override function.
1 theme call to theme_uniqueness_widget()
- uniqueness_widget_content in ./
uniqueness.module - Content of our block.
File
- ./
uniqueness.module, line 535 - uniqueness.module
Code
function theme_uniqueness_widget($description = '', $results = array()) {
// The widget title is populated by the block or in the form, if enabled.
$output = '';
// Add the Uniqueness description, if set.
if (!empty($description)) {
$output .= "<p>" . $description . "</p>";
}
// A parent block element with class uniqueness-dyn is required.
$output .= '<div class="uniqueness-dyn">';
// An element with class uniqueness-search-notifier is also required but feel
// free to alter the element or add additional markup. The element's content
// is dynamically filled by Javascript.
$output .= '<span class="uniqueness-search-notifier"></span>';
// If $$results is populated than we are on a preview page and should show the
// search result list.
if (!empty($results)) {
// Run through theme_item_list() or overrides.
$output .= theme('item_list', $results);
}
// Close parent block element.
$output .= '</div>';
return $output;
}