Adding a block to the page but not declaring it in hook_block_info() I have inherited some code from a contractor. This code adds a block to page_content but it is not defined in hook_block_info().

We then have the following code:

/**
 * Implements hook_block_view().
 */
function erepair_blocks_block_view($delta = '') {
  $block = array();
  switch ($delta) {
    ...
    case 'page_content':
      $block['content'] = page_content();
      break;
    ...
  }
  return $block;
}


This block is then displaying on some certain pages but I can't work out how.

So I have looked into the database and have found an entry for the block in the table.

It is safe to presume that they have either:


executed some sql to add the block (but did not do it in an install file)
had an entry in hook_block_info() added the block to the page then deleted the deceleration in hook_block_info()


I imagine what ever they have done is not best practice. Is there anything else they could have done (we are not using features).
The block may be positioned using the Context module, or via custom code in about a million places. What you can do is temporarily modify the template_preprocess_block() function in block.module, identify the block you're looking for by looking at the data in $variables['block'], and then looking at the output of debug_backtrace() to see the callstack and find the place the block is coming from.