function _skinr_add_file in Skinr 6.2
Same name and namespace in other branches
- 6 skinr.module \_skinr_add_file()
Helper fuction to add CSS and JS files.
The function checks an array of paths for the existence of the file to account for base themes.
1 call to _skinr_add_file()
- skinr_preprocess in ./
skinr.module - Implementation of hook_preprocess().
File
- ./
skinr.module, line 270
Code
function _skinr_add_file($filename, $type, $media = NULL) {
if (file_exists($filename)) {
if ($type == 'css') {
drupal_add_css($filename, 'theme', $media);
}
else {
drupal_add_js($filename, 'theme');
}
}
}