function feedback_block in Feedback 6.2
Same name and namespace in other branches
- 5.2 feedback.module \feedback_block()
Implementation of hook_block().
File
- ./
feedback.module, line 55 - 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/reports/feedback') {
break;
}
$block['subject'] = '<span class="feedback-link">' . t('Feedback') . '</span>';
$block['content'] = drupal_get_form('feedback_form');
break;
}
return $block;
}
}
}