You are here

function recently_read_block_info in Recently Read 7.2

Same name and namespace in other branches
  1. 7 recently_read.module \recently_read_block_info()

Implements hook_block_info().

File

./recently_read.module, line 52
Recently read module file. Displays a history of recently read nodes by currently logged in user.

Code

function recently_read_block_info() {

  // each enabled content type has its own block
  $types = node_type_get_types();
  $enabled = variable_get('recently_read_node_types', array(
    'page',
    'article',
  ));
  $blocks = array();
  foreach ($enabled as $key) {
    if (isset($types[$key])) {
      $blocks[$key] = array(
        'info' => t('Recently read - @type', array(
          '@type' => $types[$key]->name,
        )),
      );
    }
  }
  return $blocks;
}