You are here

function _themekey_scan_modules in ThemeKey 6

Function _themekey_scan_modules().

1 call to _themekey_scan_modules()
_themekey_rebuild in ./themekey_build.inc
Function _themekey_rebuild().

File

./themekey_build.inc, line 63

Code

function _themekey_scan_modules() {
  $modules = array();
  $files = file_scan_directory(drupal_get_path('module', 'themekey') . '/modules', '\\themekey.[a-z]+.inc$');
  foreach ($files as $file) {
    list(, $module) = explode('.', $file->name);
    if (module_exists($module)) {
      $modules[] = $file->name;
    }
  }
  variable_set('themekey_modules', $modules);
}