function cpn_preprocess_block in Code per Node 6
Same name and namespace in other branches
- 7 cpn.module \cpn_preprocess_block()
Implementation of template_preprocess_block().
File
- ./
cpn.module, line 396 - Primary hook implementations.
Code
function cpn_preprocess_block(&$vars) {
$block = $vars['block'];
if (!empty($block->css)) {
$css = file_create_path(variable_get('cpn_path', 'cpn') . '/' . $block->module . '-' . $block->delta . '.css');
if (!empty($css)) {
drupal_add_css($css, 'theme', NULL, variable_get('cpn_aggregation_css', TRUE));
}
}
if (!empty($block->js)) {
$js = file_create_path(variable_get('cpn_path', 'cpn') . '/' . $block->module . '-' . $block->delta . '.js');
if (!empty($js)) {
drupal_add_js($js, 'theme', 'header', TRUE, variable_get('cpn_aggregation_js', TRUE));
}
}
}