function tft_add_term_form_submit in Taxonomy File Tree 7
Same name and namespace in other branches
- 7.2 includes/tft.pages.inc \tft_add_term_form_submit()
Submission callback.
Return value
int The last inserted term tid
See also
3 calls to tft_add_term_form_submit()
- tft_archive_folder_batch_process in ./
tft.module - Processes the batch logic.
- tft_og_add_term in ./
tft.module - Create a term for in the Taxonomy File Tree vocabulary for this new OG.
- tft_rules_create_og_root_folder in ./
tft.module
File
- ./
tft.admin.inc, line 411
Code
function tft_add_term_form_submit($form, &$form_state) {
// Add the term data
$term = (object) array(
'vid' => variable_get('tft_vocabulary_vid', 0),
'name' => $form_state['values']['name'],
'parent' => $form_state['values']['parent'],
);
taxonomy_term_save($term);
return $term->tid;
}