about_this_node_block

Definition

about_this_node_block($op = 'list', $delta = 0, $edit = array())
about_this_node/about_this_node.module, line 57

Description

Implementation of hook_block()

Code

<?php
function about_this_node_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {

    // Displays block name in admin/build/blocks
    case 'list':
      $blocks[0]['info'] = t('About This Node');
      return $blocks;

    // Generates block output
    case 'view':
      if (user_access('view about this node block')) {
        $block['subject'] = t('About This Node');
        $block['content'] = about_this_node_block_contents();
        return $block;
      }
  }
}
?>