function cdn_block_view_alter in CDN 7.2
Implements hook_block_view_alter().
File
- ./
cdn.module, line 429
Code
function cdn_block_view_alter(&$data, $block) {
if (!cdn_status_is_enabled()) {
return;
}
if (isset($data['content'])) {
// Blocks with render arrays.
if (is_array($data['content']) && $data['content']) {
$data['content']['#post_render'][] = 'cdn_post_render_html_alter';
}
elseif (is_string($data['content'])) {
$data['content'] = cdn_post_render_html_alter($data['content']);
}
}
}