function views_handler_node_edit in Views (for Drupal 7) 5
display a link to edit a node
File
- modules/
views_node.inc, line 872
Code
function views_handler_node_edit($fieldinfo, $fielddata, $value, $data) {
// try to build a fake node object
$data->type = $data->node_type;
$data->uid = $data->node_uid;
$data->status = 1;
if (node_access('update', $data)) {
$link_text = $fielddata['options'] ? $fielddata['options'] : t('Edit');
return l($link_text, "node/{$data->nid}/edit");
}
}