You are here

function mobile_detect_registry_files_alter in Mobile Detect 7

Implements hook_registry_files_alter().

Adds the Mobile_Detect() class to the registry so that autoloading works. See http://drupal.stackexchange.com/questions/42266 for a discussion.

File

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

Code

function mobile_detect_registry_files_alter(&$files, $modules) {
  $library_path = _mobile_detect_get_library_path();
  $files[$library_path . '/Mobile_Detect.php'] = array(
    'module' => 'mobile_detect',
    'weight' => 0,
  );
}