function adsense_oldcode_block_info in Google AdSense integration 7
Implements hook_block_info().
File
- old/
oldcode/ adsense_oldcode.module, line 50 - Displays Google AdSense ads on Drupal pages.
Code
function adsense_oldcode_block_info() {
$blocks = array();
$max = variable_get('adsense_oldcode_number_blocks', ADSENSE_OLDCODE_NUMBER_BLOCKS_DEFAULT);
for ($count = 0; $count < $max; $count++) {
if ($ad = _adsense_oldcode_get_block_config($count)) {
$title = $ad[0];
}
else {
$title = t('AdSense old code: unconfigured !d', array(
'!d' => $count + 1,
));
}
$blocks[$count] = array(
'info' => $title,
'cache' => DRUPAL_NO_CACHE,
);
}
return $blocks;
}