You are here

function readonlymode_block_view in Read only mode 7

Implements hook_block_view().

File

./readonlymode.module, line 378
The Read Ony Mode main module file.

Code

function readonlymode_block_view($delta = '') {

  // block will be displayed only site is in readonly mode
  if ($delta == 'readonlymode_block' && variable_get('site_readonly', FALSE) == TRUE) {
    $block = array();
    $block['subject'] = t('Read only mode block');
    $block['content'] = _readonlymode_notice();
    return $block;
  }
}