function themekey_css_scan in ThemeKey 7.3
2 calls to themekey_css_scan()
- hook_themekey_rebuild in docs/
themekey.api.php - By implementing hook_themekey_rebuild() you can trigger own actions when themekey_rebuild() is called.
- themekey_css_themekey_rebuild in themekey_css/
themekey_css.module - Implements hook_themekey_rebuild().
File
- themekey_css/
themekey_css_build.inc, line 99 - The functions in this file are the back end of ThemeKey which should be used only if you configure something, but not when ThemeKey switches themes.
Code
function themekey_css_scan() {
// Get current list of items.
if (!function_exists('file_scan_directory')) {
require_once DRUPAL_ROOT . '/includes/file.inc';
}
$files = array();
foreach (file_scan_directory(DRUPAL_ROOT, '@\\.css$@i', array(
'recurse' => TRUE,
'nomask' => '/(\\.\\.?|git|simpletest)$/',
)) as $file) {
$path = str_replace(DRUPAL_ROOT . '/', '', $file->uri);
if (themekey_check_css_exists($path)) {
$files[$path] = $path;
}
}
ksort($files);
variable_set('themekey_css_files', $files);
}