function agenda_block_info in Agenda 7
Same name and namespace in other branches
- 7.2 agenda.module \agenda_block_info()
Implements hook_block_info().
File
- ./
agenda.module, line 85
Code
function agenda_block_info() {
$res = db_query("SELECT bid, value FROM {agenda} WHERE name = :name", array(
':name' => 'title',
));
$blocks = array();
while ($block = $res
->fetchObject()) {
$blocks[$block->bid] = array(
'info' => t('Agenda: @title', array(
'@title' => agenda_variable_get($block->bid, 'title', 'New block'),
)),
'cache' => DRUPAL_CACHE_GLOBAL,
);
}
return $blocks;
}