function block_block_info

Implements hook_block_info().

File

modules/block/block.module, line 207

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.