You are here

function flush_page_cache_block in Flush page cache 6

Implementation of hook_block().

File

./flush_page_cache.module, line 92
Easing the pain when you need to flush...Drupal's cache.

Code

function flush_page_cache_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks['link'] = array(
        'info' => t('Flush page cache'),
        'cache' => DRUPAL_NO_CACHE,
      );
      return $blocks;
    case 'view':
      if (user_access('flush page cache')) {
        return array(
          'content' => theme('flush_page_cache_link'),
        );
      }
      else {
        return NULL;
      }
    default:
      return;
  }
}