function google_cse_block in Google Custom Search Engine 5
Same name and namespace in other branches
- 6 google_cse.module \google_cse_block()
Implementation of hook_block().
File
- ./
google_cse.module, line 186 - Display a Google Custom Search Engine on your site.
Code
function google_cse_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks = array();
$blocks[] = array(
'info' => t('Google CSE'),
);
return $blocks;
}
else {
if ($op == 'view' && user_access('search Google CSE')) {
return array(
'subject' => t('Search'),
'content' => drupal_get_form('google_cse_searchbox_form'),
);
}
}
}