function vud_add_files in Vote Up/Down 7
Same name and namespace in other branches
- 6.3 vud.theme.inc \vud_add_files()
- 6.2 vud.theme.inc \vud_add_files()
- 7.2 vud.theme.inc \vud_add_files()
Read and load all CSS or JS files in the selected widget directory.
2 calls to vud_add_files()
- vud_votes_proxy in ./
vud.theme.inc - Proxy votes display function, that hook_theme() calls.
- vud_widget_proxy in ./
vud.theme.inc - Proxy widget function that hook_theme() calls.
File
- ./
vud.theme.inc, line 374 - Theme functions
Code
function vud_add_files($type, $plugin) {
$function = 'drupal_add_' . $type;
if (empty($plugin[$type])) {
return;
}
if (is_string($plugin[$type])) {
$css = array(
$plugin[$type],
);
}
if (is_array($plugin[$type])) {
$css = $plugin[$type];
}
if (!empty($css)) {
foreach ($css as $file) {
$function($plugin['path'] . '/' . $file);
}
}
}