function wf_crm_tokeninput_path in Webform CiviCRM Integration 7.3
Same name and namespace in other branches
- 7.5 includes/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 ./
contact_component.inc - Implements _webform_edit_component().
- _webform_render_civicrm_contact in ./
contact_component.inc - Implements _webform_render_component().
File
- ./
contact_component.inc, line 1051
Code
function wf_crm_tokeninput_path() {
static $ret;
if (!$ret) {
// First see if the library is installed in Drupal
$path = libraries_get_path('tokeninput');
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;
}