function adsense_cse_block_info in Google AdSense integration 7
Implements hook_block_info().
File
- cse/
adsense_cse.module, line 76 - Displays Google AdSense ads on Drupal pages.
Code
function adsense_cse_block_info() {
$blocks = array();
$max = variable_get('adsense_cse_number_blocks', ADSENSE_CSE_NUMBER_BLOCKS_DEFAULT);
for ($count = 0; $count < $max; $count++) {
if ($ad = _adsense_cse_get_block_config($count)) {
$title = $ad[0];
}
else {
$title = t('AdSense CSE: unconfigured !d', array(
'!d' => $count + 1,
));
}
$blocks[$count] = array(
'info' => $title,
'cache' => DRUPAL_NO_CACHE,
);
}
return $blocks;
}