function bookblock_block_info in Book Block 7
Implements hook_block_info().
File
- ./
bookblock.module, line 32 - Enables users to add specific book navigation blocks on non-book pages.
Code
function bookblock_block_info() {
$block = array();
$books = book_get_books();
$navigationblocks = variable_get('bookblock_books', array());
if (BOOKBLOCK_DEBUG) {
watchdog('bookblock', '$navigationblocks = ' . implode(',', $navigationblocks));
}
foreach ($navigationblocks as $navigationblock) {
if (isset($books[$navigationblock])) {
$block[$navigationblock]['info'] = t('Book block: @title', array(
'@title' => $books[$navigationblock]['title'],
));
// $block[$navigationblock]['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE;
}
}
return $block;
}