Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is the beginning of taxonomy_form_term_submit function:
function taxonomy_form_term_submit($form, &$form_state) {
if ($form_state['triggering_element']['#value'] == t('Delete')) {
// Execute the term deletion.
if ($form_state['values']['delete'] === TRUE) {
return taxonomy_term_confirm_delete_submit($form, $form_state);
}
// Rebuild the form to confirm term deletion.
$form_state['rebuild'] = TRUE;
$form_state['confirm_delete'] = TRUE;
return;
}
I've never seen such logic anywhere in Drupal or contrib modules. I thik it's quite safe to say this should be removed and custom page should be created with confirm_form for taxonomy term deletion.