function ckeditor_link_process_form in CKEditor Link 7
Same name and namespace in other branches
- 6 ckeditor_link.module \ckeditor_link_process_form()
1 string reference to 'ckeditor_link_process_form'
- ckeditor_link_form_alter in ./
ckeditor_link.module - Implementation of hook_form_alter().
File
- ./
ckeditor_link.module, line 67 - Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr
Code
function ckeditor_link_process_form(&$form, &$form_state) {
static $added = FALSE;
if (!$added && ($js = drupal_add_js()) && isset($js['settings']['data'])) {
$settings = call_user_func_array('array_merge_recursive', $js['settings']['data']);
if (isset($settings['ckeditor']) || isset($settings['wysiwyg']['configs']['ckeditor'])) {
drupal_add_css(drupal_get_path('module', 'ckeditor_link') . '/ckeditor_link.css');
drupal_add_js('misc/autocomplete.js');
drupal_add_js(array(
'ckeditor_link' => array(
'module_path' => base_path() . drupal_get_path('module', 'ckeditor_link'),
'autocomplete_path' => url('ckeditor_link/autocomplete'),
'msg_invalid_path' => t('Link must be a valid Drupal path.'),
),
), 'setting');
$added = TRUE;
}
}
return $form;
}