function top_searches_block in Top Searches 5
Same name and namespace in other branches
- 6 top_searches.module \top_searches_block()
Implementation of hook_block().
File
- ./
top_searches.module, line 71
Code
function top_searches_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Top Searches');
return $blocks;
case 'view':
switch ($delta) {
case 0:
$top_searches = top_searches_collect_results();
if (count($top_searches)) {
$block['subject'] = t("Top Searches");
$block['content'] = theme('top_searches_block', $top_searches);
}
break;
}
return $block;
}
}