You are here

function _get_chosen_path in Language Switcher Dropdown 7

Get the location of the chosen library.

Return value

The location of the library, or FALSE if the library isn't installed.

3 calls to _get_chosen_path()
lang_dropdown_block_configure in ./lang_dropdown.module
Implements hook_block_configure().
lang_dropdown_form in ./lang_dropdown.module
Function to build the select widget form.
_lang_dropdown_validate_output_value in ./lang_dropdown.module
Validates output value

File

./lang_dropdown.module, line 621

Code

function _get_chosen_path() {
  $path = FALSE;
  if (function_exists('libraries_get_path')) {
    $path = libraries_get_path('chosen');
    if (!file_exists($path)) {
      $path = FALSE;
    }
  }
  elseif (file_exists('sites/all/libraries/chosen/chosen.jquery.min.js')) {
    $path = 'sites/all/libraries/chosen';
  }
  return $path;
}