function a11y_titles_preprocess_block in A11y titles 6
Implements hook_preprocess_block().
File
- ./
a11y_titles.module, line 26 - Provides open access to content titles.
Code
function a11y_titles_preprocess_block(&$variables) {
// Grab the display value;
$blocks = variable_get('a11y_titles_blocks', array());
$display = isset($blocks[$variables['block']->module . '--' . $variables['block']->delta]) ? $blocks[$variables['block']->module . '--' . $variables['block']->delta] : 'normal';
// Optionally hide the block title.
switch ($display) {
case 'invisible':
if (isset($variables['classes'])) {
$variables['classes'] .= ' title-element-invisible';
}
else {
$variables['classes'] = 'title-element-invisible';
}
break;
case 'hidden':
$variables['block']->subject = '';
break;
}
}