function linkit_profiles_form_submit in Linkit 7.3
Linkit profile submit callback.
See also
File
- plugins/
export_ui/ linkit_profiles.inc, line 95
Code
function linkit_profiles_form_submit(&$form, &$form_state) {
// Unset some variables used by "field profiles" to make it clean.
if ($form_state['values']['profile_type'] == LINKIT_PROFILE_TYPE_EDITOR) {
unset($form_state['values']['data']['insert_plugin']['plugin']);
}
// Unset some variables used by "editor profiles" to make it clean.
if ($form_state['values']['profile_type'] == LINKIT_PROFILE_TYPE_FIELD) {
unset($form_state['values']['data']['text_formats']);
}
// Force raw URL plugin and method for 'menu' profiles.
if ($form_state['values']['profile_type'] == LINKIT_PROFILE_TYPE_MENU) {
$form_state['values']['data']['insert_plugin']['plugin'] = 'raw_url';
$form_state['values']['data']['insert_plugin']['url_method'] = LINKIT_URL_METHOD_RAW;
}
// Unset active tab state, we dont need to save this.
unset($form_state['values']['data']['data__active_tab']);
}