function adsense_managed_block_info in Google AdSense integration 7
Implements hook_block_info().
File
- managed/
adsense_managed.module, line 81 - Displays Google AdSense ads on Drupal pages.
Code
function adsense_managed_block_info() {
$blocks = array();
$max = variable_get('adsense_managed_number_blocks', ADSENSE_MANAGED_NUMBER_BLOCKS_DEFAULT);
for ($count = 0; $count < $max; $count++) {
if ($ad = _adsense_managed_get_block_config($count)) {
$title = $ad[0];
}
else {
$title = t('AdSense: unconfigured !d', array(
'!d' => $count + 1,
));
}
$blocks[$count] = array(
'info' => $title,
'cache' => DRUPAL_NO_CACHE,
);
}
return $blocks;
}