function views_handler_node_delete_destination in Views (for Drupal 7) 5
display a link to delete a node with a destination return
File
- modules/
views_node.inc, line 914
Code
function views_handler_node_delete_destination($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('delete', $data)) {
$link_text = $fielddata['options'] ? $fielddata['options'] : t('Delete');
return l($link_text, "node/{$data->nid}/delete", NULL, drupal_get_destination());
}
}