You are here

function views_block_block_load in Views Hacks 7

Implements hook_TYPE_load().

File

views_block/views_block.module, line 58

Code

function views_block_block_load($blocks) {
  foreach ($blocks as &$block) {
    if ($block->module == 'block') {
      $block_custom = db_query("SELECT * FROM {block_custom} WHERE bid = :delta", array(
        ':delta' => $block->delta,
      ))
        ->fetchObject();
      if ($block_custom) {
        $block->info = $block_custom->info;
        $block->body = $block_custom->body;
        $block->format = $block_custom->format;
      }
    }
  }
}