function _uniqueness_node_add_submit in Uniqueness 6
Custom submit handler for the node add form.
1 string reference to '_uniqueness_node_add_submit'
- uniqueness_form_alter in ./
uniqueness.module - Implementation of hook_form_alter().
File
- ./
uniqueness.module, line 235 - uniqueness.module
Code
function _uniqueness_node_add_submit($form, &$form_state) {
// We only look for similar content if the Preview button was clicked.
if ($form_state['clicked_button']['#id'] == 'edit-preview') {
$values = $form_state['values'];
$store = array();
// Store the title.
if (!empty($values['title'])) {
$store['title'] = strip_tags($values['title']);
}
// Store the tags.
if (!empty($values['taxonomy']['tags'][1])) {
$store['tags'] = strip_tags($values['taxonomy']['tags'][1]);
}
if (!empty($store)) {
_uniqueness_store($store);
}
}
}