function i18n_block_context_block_info_alter in Internationalization 7
Implements hook_context_block_info_alter().
File
- i18n_block/
i18n_block.module, line 131 - Internationalization (i18n) submodule: Multilingual meta-blocks
Code
function i18n_block_context_block_info_alter(&$block_info) {
$theme_key = variable_get('theme_default', 'garland');
$result = db_select('block')
->fields('block', array(
'module',
'delta',
'i18n_mode',
))
->condition('theme', $theme_key)
->execute();
foreach ($result as $row) {
if (isset($block_info["{$row->module}-{$row->delta}"])) {
$block_info["{$row->module}-{$row->delta}"]->i18n_mode = $row->i18n_mode;
}
}
}