You are here

function simpleads_block_info in SimpleAds 7

Same name and namespace in other branches
  1. 7.2 includes/blocks.inc \simpleads_block_info()

Implements hook_block_info().

File

./simpleads.module, line 234

Code

function simpleads_block_info() {
  $blocks = array();
  $result = db_select('simpleads_blocks', 'sb')
    ->fields('sb')
    ->execute();
  foreach ($result as $block) {
    $data = unserialize($block->settings);
    $blocks[$data['block_delta']] = array(
      'info' => t('Advertisement Block: @name', array(
        '@name' => $data['block_info'],
      )),
      'cache' => DRUPAL_NO_CACHE,
    );
  }
  return $blocks;
}