function freelinking_multiple_delete_confirm in Freelinking 6.2
Same name and namespace in other branches
- 5 freelinking.module \freelinking_multiple_delete_confirm()
- 6 freelinking.module \freelinking_multiple_delete_confirm()
1 string reference to 'freelinking_multiple_delete_confirm'
File
- ./
freelinking.module, line 380
Code
function freelinking_multiple_delete_confirm($links = array()) {
$form['links'] = array(
'#prefix' => '<ul>',
'#suffix' => '</ul>',
'#tree' => TRUE,
);
// array_filter() returns only elements that are TRUE
foreach ($links['post']['links'] as $hash => $value) {
$phrase = db_result(db_query('SELECT phrase FROM {freelinking} WHERE hash = "%s"', $hash));
$form['links'][$hash] = array(
'#type' => 'hidden',
'#value' => $hash,
'#prefix' => '<li>',
'#suffix' => check_plain($phrase),
);
}
//endforeach looping through $links
$form['operation'] = array(
'#type' => 'hidden',
'#value' => 'delete',
);
return confirm_form($form, t('Are you sure you want to delete these items?'), 'freelinking', t('This action cannot be undone.'), t('Delete all'), t('Cancel'));
}