function feedback_block in Feedback 5.2
Same name and namespace in other branches
- 6.2 feedback.module \feedback_block()
Implementation of hook_block().
File
- ./
feedback.module, line 40 - Allows site visitors and users to report issues about this site.
Code
function feedback_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks['form'] = array(
'info' => t('Feedback form'),
);
return $blocks;
}
else {
if ($op == 'view') {
$block = array();
switch ($delta) {
case 'form':
if (!user_access('access feedback form') || $_GET['q'] == 'admin/logs/feedback') {
break;
}
$block['subject'] = '<span class="feedback-link">' . t('Feedback') . '</span>';
$block['content'] = drupal_get_form('feedback_form');
break;
}
return $block;
}
}
}