function _linkit_add_settings in Linkit 7
Same name and namespace in other branches
- 6 linkit.module \_linkit_add_settings()
- 7.2 linkit.module \_linkit_add_settings()
2 calls to _linkit_add_settings()
- linkit_element_info_alter in ./
linkit.module - Implements hook_element_info_alter().
- linkit_wysiwyg_plugin in ./
linkit.module
File
- ./
linkit.module, line 388 - Main file for linkit module.
Code
function _linkit_add_settings($editor) {
static $editor_settings_added = array();
static $global_settings_added = FALSE;
if (!isset($editor_settings_added[$editor])) {
$editor_settings_added[$editor] = TRUE;
// Add popup url
$settings = array(
'linkit' => array(
'url' => array(
$editor => url('linkit/dashboard/' . $editor),
),
),
);
drupal_add_js($settings, 'setting');
}
if (!$global_settings_added) {
$global_settings_added = TRUE;
// Add global settings for Linkit
$settings = array(
'linkit' => array(
'modulepath' => drupal_get_path('module', 'linkit'),
),
);
drupal_add_js($settings, 'setting');
}
}