function adsense_cse_block_view in Google AdSense integration 7
Implements hook_block_view().
File
- cse/
adsense_cse.module, line 153 - Displays Google AdSense ads on Drupal pages.
Code
function adsense_cse_block_view($delta = '') {
$block = array();
if (_adsense_page_match()) {
$ad = _adsense_cse_get_block_config($delta);
$fo = isset($ad[2]) && $ad[2] === '2' ? 'Search Box v2' : 'Search Box';
$block['content'] = $ad ? adsense_display(array(
'title' => $ad[0],
'format' => $fo,
'slot' => $ad[1],
)) : _adsense_configure_block_message(url('admin/structure/block/manage/adsense_cse/' . $delta));
}
return $block;
}