function wf_crm_tokeninput_path in Webform CiviCRM Integration 7.5
Same name and namespace in other branches
- 7.3 contact_component.inc \wf_crm_tokeninput_path()
- 7.4 includes/contact_component.inc \wf_crm_tokeninput_path()
Get the path to the jquery.tokeninput plugin
Return value
string
2 calls to wf_crm_tokeninput_path()
- _webform_edit_civicrm_contact in includes/
contact_component.inc - Implements _webform_edit_component().
- _webform_render_civicrm_contact in includes/
contact_component.inc - Implements _webform_render_component().
File
- includes/
contact_component.inc, line 1166
Code
function wf_crm_tokeninput_path() {
static $ret;
if (!$ret) {
// First see if the library is installed in Drupal
$path = function_exists('libraries_get_path') ? libraries_get_path('tokeninput') : NULL;
if ($path && is_file(DRUPAL_ROOT . '/' . $path . '/src/jquery.tokeninput.js')) {
$ret = $path . '/src/jquery.tokeninput.js';
}
else {
$ret = drupal_get_path('module', 'civicrm') . '/../packages/jquery/plugins/jquery.tokeninput.js';
}
}
return $ret;
}