function invite_block in Invite 5.2
Same name and namespace in other branches
- 5 invite.module \invite_block()
- 6.2 invite.module \invite_block()
Implementation of hook_block().
File
- ./
invite.module, line 501 - Allows your users to send and track invitations to join your site.
Code
function invite_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks[0] = array(
'info' => t('Invite a friend'),
);
return $blocks;
}
else {
if ($op == 'view') {
switch ($delta) {
case 0:
if (user_access('send invitations')) {
$block = array(
'subject' => t('Invite a friend'),
'content' => drupal_get_form('invite_form', 'block'),
);
}
break;
}
return $block;
}
}
}