7.x block.module block_block_info()

Implements hook_block_info().

File

modules/block/block.module, line 207
Controls the visual building blocks a page is constructed with.

Code

function block_block_info() {
  $blocks = array();
  $result = db_query('SELECT bid, info FROM {block_custom} ORDER BY info');
  foreach ($result as $block) {
    $blocks[$block->bid]['info'] = $block->info;

    // Not worth caching.
    $blocks[$block->bid]['cache'] = DRUPAL_NO_CACHE;
  }
  return $blocks;
}