1 taxonomy.admin.inc | taxonomy_vocabulary_confirm_reset_alphabetical($form, &$form_state, $vocabulary_name) |
Form builder to confirm resetting a vocabulary to alphabetical order.
See also
taxonomy_vocabulary_confirm_reset_alphabetical_submit()
Related topics
File
- core/
modules/ taxonomy/ taxonomy.admin.inc, line 1145 - Admin page callbacks for the Taxonomy module.
Code
function taxonomy_vocabulary_confirm_reset_alphabetical($form, &$form_state, $vocabulary_name) {
$vocabulary = taxonomy_vocabulary_load($vocabulary_name);
$form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
$form['machine_name'] = array('#type' => 'value', '#value' => $vocabulary->machine_name);
$form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
$form['reset_alphabetical'] = array('#type' => 'value', '#value' => TRUE);
return confirm_form($form,
t('Are you sure you want to reset the vocabulary %title to alphabetical order?',
array('%title' => $vocabulary->name)),
'admin/structure/taxonomy/' . $vocabulary->machine_name,
t('Resetting a vocabulary will discard all custom ordering and sort items alphabetically.'),
t('Reset to alphabetical'),
t('Cancel'));
}