Same name and namespace in other branches
  1. 4.6.x modules/archive.module \archive_block()

Implementation of hook_block().

Generates a calendar for the current month, with links to the archives for each day.

File

modules/archive.module, line 51
Displays a calendar to navigate old content.

Code

function archive_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[0]['info'] = t('Calendar to browse archives');
    return $blocks;
  }
  else {
    if ($op == 'view' && user_access('access content')) {
      $block['subject'] = t('Browse archives');
      $block['content'] = archive_calendar();
      return $block;
    }
  }
}