function simpleanswer_link in Answers 5.2
File
- simpleanswer/
simpleanswer.module, line 112 - Adds a simple form to post a response/answer to questions using the answers module. This module does not display its content directly and requires the answers module to show its content.
Code
function simpleanswer_link($type, $node = 0, $main = 0) {
global $user;
$links = array();
if ($node && variable_get(ANSWERS_TYPE . 'simpleanswer_editable', '0')) {
if ($node->type == 'simpleanswer') {
if ($node->uid == $user->uid || $user->uid == 1) {
$links['editlink'] = array(
'title' => t('EDIT'),
'href' => 'node/' . $node->nid . '/edit',
);
}
}
}
return $links;
}