You are here

function date_popup_get_wvega_path in Date 7.2

Same name and namespace in other branches
  1. 7.3 date_popup/date_popup.module \date_popup_get_wvega_path()

Get the location of the Willington Vega timepicker library.

Return value

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

3 calls to date_popup_get_wvega_path()
date_popup_add in date_popup/date_popup.module
Load needed files.
date_popup_get_preferred_timepicker in date_popup/date_popup.module
Get the name of the preferred default timepicker.
date_popup_settings in date_popup/date_popup.module
General configuration form for controlling the Date Popup behaviour.

File

date_popup/date_popup.module, line 49
A module to enable jQuery calendar and time entry popups.

Code

function date_popup_get_wvega_path() {
  $path = FALSE;
  if (function_exists('libraries_get_path')) {

    // Try loading the wvega timepicker library.
    $path = libraries_get_path('wvega-timepicker');

    // Check if the library actually exists.
    if (empty($path) || !file_exists($path)) {
      $path = FALSE;
    }
  }
  elseif (file_exists('sites/all/libraries/wvega-timepicker/jquery.timepicker.js')) {
    $path = 'sites/all/libraries/wvega-timepicker';
  }
  return $path;
}