function community_tags_node_node_tag_mgmt_confirm_submit in Community Tags 6.2
Submit handler for tag mgmt operation confirm form.
2 string references to 'community_tags_node_node_tag_mgmt_confirm_submit'
- community_tags_node_form_community_tags_node_tag_mgmt_confirm_alter in community_tags_node/
community_tags_node.module - Implementation of hook_form_FORM_ID_alter() for community tag managment operation confirmation form.
- community_tags_node_form_community_tags_node_tag_mgmt_form_alter in community_tags_node/
community_tags_node.module - Implementation of hook_form_FORM_ID_alter() for community tag managment form.
File
- community_tags_node/
community_tags_node.module, line 125 - community_tags_node.module
Code
function community_tags_node_node_tag_mgmt_confirm_submit($form, &$form_state) {
if ($form['#ct_op'] == 'promote') {
$nid = $form['#node']->nid;
$tids = $form['#tids'];
$node_to_save = node_load($nid, NULL, TRUE);
foreach ($tids as $tid) {
$term = taxonomy_get_term($tid);
$node_to_save->taxonomy[$tid] = $term;
$node_save_required = TRUE;
}
$node_to_save->community_tags_op = TRUE;
node_save($node_to_save);
drupal_set_message(t('%count tags promoted.', array(
'%count' => count($tids),
)));
}
}