function taxonomy_term_confirm_parents
6.x taxonomy.admin.inc | taxonomy_term_confirm_parents(&$form_state, $vocabulary) |
Form builder for the confirmation of multiple term parents.
See also
Related topics
1 call to taxonomy_term_confirm_parents()
- taxonomy_form_term in drupal-6.x/
modules/ taxonomy/ taxonomy.admin.inc - Form function for the term edit form.
File
- drupal-6.x/
modules/ taxonomy/ taxonomy.admin.inc, line 809 - Administrative page callbacks for the taxonomy module.
Code
function taxonomy_term_confirm_parents(&$form_state, $vocabulary) {
$form = array();
foreach (element_children($form_state['values']) as $key) {
$form[$key] = array(
'#type' => 'value',
'#value' => $form_state['values'][$key],
);
}
$question = t('Set multiple term parents?');
$description = '<p>' . t("Adding multiple parents to a term will cause the %vocabulary vocabulary to look for multiple parents on every term. Because multiple parents are not supported when using the drag and drop outline interface, drag and drop will be disabled if you enable this option. If you choose to have multiple parents, you will only be able to set parents by using the term edit form.", array('%vocabulary' => $vocabulary->name)) . '</p>';
$description .= '<p>' . t("You may re-enable the drag and drop interface at any time by reducing multiple parents to a single parent for the terms in this vocabulary.") . '</p>';
return confirm_form($form, $question, drupal_get_destination(), $description, t('Set multiple parents'));
}