You are here

function adsense_search_block_view in Google AdSense integration 7

Implements hook_block_view().

File

old/search/adsense_search.module, line 118
Displays Google AdSense ads on Drupal pages.

Code

function adsense_search_block_view($delta) {
  $block = array();
  if (_adsense_page_match()) {
    $ad = _adsense_search_get_block_config($delta);
    $block['content'] = $ad ? adsense_display(array(
      'title' => $ad[0],
      'format' => 'Search Box',
      'channel' => $ad[1],
    )) : _adsense_configure_block_message(url('admin/structure/block/manage/adsense_search/' . $delta));
  }
  return $block;
}