You are here

function _mobile_detect_get_library_path in Mobile Detect 7

Retrieve the path to the Mobile_Detect library.

@access private

Return value

string Candidate path to the Mobile_Detect library, relative to Drupal root.

2 calls to _mobile_detect_get_library_path()
mobile_detect_registry_files_alter in ./mobile_detect.module
Implements hook_registry_files_alter().
mobile_detect_requirements in ./mobile_detect.install
Implements hook_requirements().

File

./mobile_detect.module, line 118
Lightweight mobile detection based on the Mobile_Detect.php library.

Code

function _mobile_detect_get_library_path() {
  if (function_exists('libraries_get_path')) {
    $library_path = libraries_get_path('Mobile_Detect');
    if (!$library_path) {
      $library_path = 'sites/all/libraries/Mobile_Detect';
    }
  }
  else {
    $library_path = 'sites/all/libraries/Mobile_Detect';
  }
  return $library_path;
}