taxonomy_term_confirm_delete

Versions
5
taxonomy_term_confirm_delete($tid)
6
taxonomy_term_confirm_delete(&$form_state, $tid)
7
taxonomy_term_confirm_delete($form, &$form_state, $tid)

Form builder for the term delete form.

See also

taxonomy_term_confirm_delete_submit()

Related topics

Code

modules/taxonomy/taxonomy.admin.inc, line 829

<?php
function taxonomy_term_confirm_delete(&$form_state, $tid) {
  $term = taxonomy_get_term($tid);

  $form['type'] = array('#type' => 'value', '#value' => 'term');
  $form['name'] = array('#type' => 'value', '#value' => $term->name);
  $form['tid'] = array('#type' => 'value', '#value' => $tid);
  $form['delete'] = array('#type' => 'value', '#value' => TRUE);
  return confirm_form($form,
                  t('Are you sure you want to delete the term %title?',
                  array('%title' => $term->name)),
                  'admin/content/taxonomy',
                  t('Deleting a term will delete all its children if there are any. This action cannot be undone.'),
                  t('Delete'),
                  t('Cancel'));
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.